From c763478f66cd43446373d0261fd3d42c83721e5e Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 22 Jul 2023 19:21:12 +0800 Subject: [PATCH] fix typo and os info --- src/common.rs | 4 ++-- src/hbbs_http/sync.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common.rs b/src/common.rs index 74e8dc591..d42e27285 100644 --- a/src/common.rs +++ b/src/common.rs @@ -761,8 +761,8 @@ pub fn get_sysinfo() -> serde_json::Value { let cpu_freq = cpus.first().map(|x| x.frequency()).unwrap_or_default(); let num_cpus = num_cpus::get(); let num_pcpus = num_cpus::get_physical(); - let os = system.name().unwrap_or(system.distribution_id()); - let os = format!("{} {}", os, system.os_version().unwrap_or_default()); + let os = system.distribution_id(); + let os = format!("{} / {}", os, system.long_os_version().unwrap_or_default()); let hostname = system.host_name(); serde_json::json!({ "cpu": format!("{cpu_name}, {cpu_freq}MHz, {num_cpus}/{num_pcpus} cores"), diff --git a/src/hbbs_http/sync.rs b/src/hbbs_http/sync.rs index e3df8f7d5..f30685aea 100644 --- a/src/hbbs_http/sync.rs +++ b/src/hbbs_http/sync.rs @@ -65,7 +65,7 @@ async fn start_hbbs_sync_async() { } if !info_uploaded.0 && info_uploaded.2.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true){ let mut v = crate::get_sysinfo(); - v["verion"] = json!(crate::VERSION); + v["version"] = json!(crate::VERSION); v["id"] = json!(Config::get_id()); v["uuid"] = json!(crate::encode64(hbb_common::get_uuid())); match crate::post_request(url.replace("heartbeat", "sysinfo"), v.to_string(), "").await {