mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-04 00:33:12 +00:00
lan discovery almost done
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
1 parent
5682b088de
commit
d00352f4e4
9 files changed
+93
-47
No files matched your search
+16
@@ -389,6 +389,22 @@ pub fn get_id() -> String {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn get_id_async() -> String {
|
||||
if let Ok(Some(v)) = get_config_async("id", 1_000).await {
|
||||
// update salt also, so that next time reinstallation not causing first-time auto-login failure
|
||||
if let Ok(Some(v2)) = get_config_async("salt", 1_000).await {
|
||||
Config::set_salt(&v2);
|
||||
}
|
||||
if v != Config::get_id() {
|
||||
Config::set_key_confirmed(false);
|
||||
Config::set_id(&v);
|
||||
}
|
||||
v
|
||||
} else {
|
||||
Config::get_id()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_password() -> String {
|
||||
if let Ok(Some(v)) = get_config("password") {
|
||||
Config::set_password(&v);
|
||||
|
||||
Reference in new issue
Block a user