aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'libindicator/indicator-service.c')
-rw-r--r--libindicator/indicator-service.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c
index d3e873b..01fabce 100644
--- a/libindicator/indicator-service.c
+++ b/libindicator/indicator-service.c
@@ -387,9 +387,19 @@ _indicator_service_server_watch (IndicatorService * service, DBusGMethodInvocati
const gchar * sender = dbus_g_method_get_sender(method);
if (g_hash_table_lookup(priv->watchers, sender) == NULL) {
- DBusGProxy * senderproxy = (gpointer)1;
-
- g_hash_table_insert(priv->watchers, g_strdup(sender), senderproxy);
+ GError * error = NULL;
+ DBusGProxy * senderproxy = dbus_g_proxy_new_for_name_owner(priv->bus,
+ sender,
+ "/",
+ DBUS_INTERFACE_INTROSPECTABLE,
+ &error);
+
+ if (error == NULL) {
+ g_hash_table_insert(priv->watchers, g_strdup(sender), senderproxy);
+ } else {
+ g_warning("Unable to create proxy for watcher '%s': %s", sender, error->message);
+ g_error_free(error);
+ }
}
if (priv->timeout != 0) {