Merge pull request #3629 from fufesou/refact/cm_start_ipc

cm, better position to start ipc
This commit is contained in:
RustDesk
2023-03-13 14:27:03 +08:00
committed by GitHub
4 changed files with 14 additions and 6 deletions

View File

@@ -234,6 +234,9 @@ class PlatformFFI {
debugPrint(
'_appType:$_appType,info1-id:$id,info2-name:$name,dir:$_dir');
}
if (desktopType == DesktopType.cm) {
await _ffiBind.cmStartListenIpcThread();
}
await _ffiBind.mainDeviceId(id: id);
await _ffiBind.mainDeviceName(name: name);
await _ffiBind.mainSetHomeDir(home: _homeDir);

View File

@@ -128,10 +128,13 @@ class ServerModel with ChangeNotifier {
_connectStatus = status;
notifyListeners();
}
final res = await bind.cmCheckClientsLength(length: _clients.length);
if (res != null) {
debugPrint("clients not match!");
updateClientState(res);
if (desktopType == DesktopType.cm) {
final res = await bind.cmCheckClientsLength(length: _clients.length);
if (res != null) {
debugPrint("clients not match!");
updateClientState(res);
}
}
updatePasswordModel();