Codebase list xapp / cc5e6ac
sn-watcher.c: Move invocation completion to the registration callback. This should be called when the registration is actually finished. Michael Webster 3 years ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
298298 typedef struct
299299 {
300300 XAppSnWatcher *watcher;
301 GDBusMethodInvocation *invocation;
301302 gchar *key;
302303 gchar *path;
303304 gchar *bus_name;
337338 sn_watcher_interface_emit_status_notifier_item_registered (watcher->skeleton,
338339 data->service);
339340
341 sn_watcher_interface_complete_register_status_notifier_item (watcher->skeleton,
342 data->invocation);
343
340344 g_free (data->key);
341345 g_free (data->path);
342346 g_free (data->bus_name);
343347 g_free (data->service);
348 g_object_unref (data->invocation);
344349 g_slice_free (NewSnProxyData, data);
345350 }
346351
381386 data->path = g_strdup (path);
382387 data->bus_name = g_strdup (bus_name);
383388 data->service = g_strdup (service);
389 data->invocation = g_object_ref (invocation);
384390
385391 sn_item_interface_proxy_new (watcher->connection,
386392 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
390396 sn_item_proxy_new_completed,
391397 data);
392398 }
393
394 sn_watcher_interface_complete_register_status_notifier_item (watcher->skeleton,
395 invocation);
396399
397400 return TRUE;
398401 }