mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge remote-tracking branch 'rustdesk/master' into flutter_desktop
# Conflicts: # Cargo.lock # Cargo.toml # build.rs # flutter/.gitignore # flutter/lib/common.dart # flutter/lib/mobile/pages/remote_page.dart # flutter/lib/models/model.dart # flutter/lib/models/native_model.dart # flutter/lib/models/server_model.dart # flutter/pubspec.lock # flutter/pubspec.yaml # src/client.rs # src/client/file_trait.rs # src/flutter.rs # src/mobile_ffi.rs # src/ui.rs
This commit is contained in:
@@ -91,6 +91,15 @@ async fn accept_connection_(server: ServerPtr, socket: Stream, secure: bool) ->
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn check_privacy_mode_on(stream: &mut Stream) -> ResultType<()> {
|
||||
if video_service::get_privacy_mode_conn_id() > 0 {
|
||||
let msg_out =
|
||||
crate::common::make_privacy_mode_msg(back_notification::PrivacyModeState::OnByOther);
|
||||
timeout(CONNECT_TIMEOUT, stream.send(&msg_out)).await??;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn create_tcp_connection(
|
||||
server: ServerPtr,
|
||||
stream: Stream,
|
||||
@@ -98,6 +107,8 @@ pub async fn create_tcp_connection(
|
||||
secure: bool,
|
||||
) -> ResultType<()> {
|
||||
let mut stream = stream;
|
||||
check_privacy_mode_on(&mut stream).await?;
|
||||
|
||||
let id = {
|
||||
let mut w = server.write().unwrap();
|
||||
w.id_count += 1;
|
||||
@@ -423,5 +434,5 @@ async fn sync_and_watch_config_dir() {
|
||||
}
|
||||
}
|
||||
}
|
||||
log::error!("skipped config sync");
|
||||
log::warn!("skipped config sync");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user