mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-04 16:11:27 +03:00
fix: custom client, options, option2bool() (#8302)
* fix: custom client, options, option2bool() Signed-off-by: fufesou <linlong1266@gmail.com> * format Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -34,7 +34,11 @@ pub(super) fn start_listening() -> ResultType<()> {
|
||||
if let Ok(msg_in) = Message::parse_from_bytes(&buf[0..len]) {
|
||||
match msg_in.union {
|
||||
Some(rendezvous_message::Union::PeerDiscovery(p)) => {
|
||||
if p.cmd == "ping" && Config::get_option("enable-lan-discovery").is_empty()
|
||||
if p.cmd == "ping"
|
||||
&& config::option2bool(
|
||||
"enable-lan-discovery",
|
||||
&Config::get_option("enable-lan-discovery"),
|
||||
)
|
||||
{
|
||||
if let Some(self_addr) = get_ipaddr_by_peer(&addr) {
|
||||
let mut msg_out = Message::new();
|
||||
|
||||
Reference in New Issue
Block a user