mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
lan discovery almost done
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
16
src/ipc.rs
16
src/ipc.rs
@@ -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