dbus: Check if the Services are really resolved

pull/110/head
Olivier Martin 2019-07-07 12:46:15 +02:00 committed by Olivier Martin
parent 1db0ab51a6
commit 8438cd5c0d
1 changed files with 6 additions and 4 deletions

View File

@ -288,11 +288,13 @@ gboolean on_handle_device_property_change(
}
}
} else if (strcmp(key, "ServicesResolved") == 0) {
// Stop the timeout for connection
g_source_remove(conn_context->connection_timeout);
if (g_variant_get_boolean(value)) {
// Stop the timeout for connection
g_source_remove(conn_context->connection_timeout);
// Tell we are now connected
g_main_loop_quit(conn_context->connection_loop);
// Tell we are now connected
g_main_loop_quit(conn_context->connection_loop);
}
}
}
}