@@ -758,6 +758,8 @@ static struct adv_monitor_app *app_create(DBusConnection *conn,
app->monitors = queue_new();
+ app->reg = dbus_message_ref(msg);
+
g_dbus_client_set_disconnect_watch(app->client, app_disconnect_cb, app);
/* Note that any property changes on a monitor object would not affect
@@ -769,8 +771,6 @@ static struct adv_monitor_app *app_create(DBusConnection *conn,
g_dbus_client_set_ready_watch(app->client, app_ready_cb, app);
- app->reg = dbus_message_ref(msg);
-
return app;
}
@@ -864,7 +864,7 @@ static DBusMessage *unregister_monitor(DBusConnection *conn,
}
static const GDBusMethodTable adv_monitor_methods[] = {
- { GDBUS_EXPERIMENTAL_METHOD("RegisterMonitor",
+ { GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterMonitor",
GDBUS_ARGS({ "application", "o" }),
NULL, register_monitor) },
{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterMonitor",