mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
remove useless stop-rendezvous-service
This commit is contained in:
parent
9ab5512bfa
commit
dd90096e13
@ -1430,9 +1430,8 @@ bool option2bool(String option, String value) {
|
||||
if (option.startsWith("enable-")) {
|
||||
res = value != "N";
|
||||
} else if (option.startsWith("allow-") ||
|
||||
option == kOptionStopService ||
|
||||
option == "stop-service" ||
|
||||
option == kOptionDirectServer ||
|
||||
option == "stop-rendezvous-service" ||
|
||||
option == kOptionForceAlwaysRelay) {
|
||||
res = value == "Y";
|
||||
} else {
|
||||
@ -1447,9 +1446,8 @@ String bool2option(String option, bool b) {
|
||||
if (option.startsWith('enable-')) {
|
||||
res = b ? defaultOptionYes : 'N';
|
||||
} else if (option.startsWith('allow-') ||
|
||||
option == kOptionStopService ||
|
||||
option == "stop-service" ||
|
||||
option == kOptionDirectServer ||
|
||||
option == "stop-rendezvous-service" ||
|
||||
option == kOptionForceAlwaysRelay) {
|
||||
res = b ? 'Y' : defaultOptionNo;
|
||||
} else {
|
||||
@ -1485,9 +1483,9 @@ bool mainGetPeerBoolOptionSync(String id, String key) {
|
||||
return option2bool(key, bind.mainGetPeerOptionSync(id: id, key: key));
|
||||
}
|
||||
|
||||
// Don't use `option2bool()` and `bool2option()` to convert the session option.
|
||||
// Use `sessionGetToggleOption()` and `sessionToggleOption()` instead.
|
||||
// Because all session options use `Y` and `<Empty>` as values.
|
||||
mainSetPeerBoolOptionSync(String id, String key, bool v) {
|
||||
bind.mainSetPeerOptionSync(id: id, key: key, value: bool2option(key, v));
|
||||
}
|
||||
|
||||
Future<bool> matchPeer(String searchText, Peer peer) async {
|
||||
if (searchText.isEmpty) {
|
||||
@ -2672,7 +2670,7 @@ Future<void> start_service(bool is_start) async {
|
||||
!isMacOS ||
|
||||
await callMainCheckSuperUserPermission();
|
||||
if (checked) {
|
||||
mainSetBoolOption(kOptionStopService, !is_start);
|
||||
bind.mainSetOption(key: "stop-service", value: is_start ? "" : "Y");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2027,7 +2027,6 @@ pub fn option2bool(option: &str, value: &str) -> bool {
|
||||
} else if option.starts_with("allow-")
|
||||
|| option == "stop-service"
|
||||
|| option == keys::OPTION_DIRECT_SERVER
|
||||
|| option == "stop-rendezvous-service"
|
||||
|| option == "force-always-relay"
|
||||
{
|
||||
value == "Y"
|
||||
|
Loading…
Reference in New Issue
Block a user