aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Carr <racarr@canonical.com>2011-12-01 11:54:16 -0500
committerRobert Carr <racarr@canonical.com>2011-12-01 11:54:16 -0500
commit6467734c50eb71e59bbacfa2baf5b9ccfa3e1c2b (patch)
tree1c3b16bd9ac5ed2c94fad9d1cf3e01874f4100bc
parentd3f2a4b29a08e4d191519eca806cd8b82f6d3f69 (diff)
downloadayatana-indicator-messages-6467734c50eb71e59bbacfa2baf5b9ccfa3e1c2b.tar.gz
ayatana-indicator-messages-6467734c50eb71e59bbacfa2baf5b9ccfa3e1c2b.tar.bz2
ayatana-indicator-messages-6467734c50eb71e59bbacfa2baf5b9ccfa3e1c2b.zip
serverList_equal: We have to compare IndicateListenerServers by DBus path instead of just name. This fixes issues where one client (DBus name) will create two or more indicate servers.
-rw-r--r--src/messages-service.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index e8fe576..44e922e 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -104,10 +104,15 @@ serverList_equal (gconstpointer a, gconstpointer b)
pa = (serverList_t *)a;
pb = (serverList_t *)b;
- const gchar * pas = INDICATE_LISTENER_SERVER_DBUS_NAME(pa->server);
- const gchar * pbs = INDICATE_LISTENER_SERVER_DBUS_NAME(pb->server);
-
- return g_strcmp0(pas, pbs);
+ const gchar * pan = INDICATE_LISTENER_SERVER_DBUS_NAME(pa->server);
+ const gchar * pbn = INDICATE_LISTENER_SERVER_DBUS_NAME(pb->server);
+ const gchar * pap = indicate_listener_server_get_dbuspath(pa->server);
+ const gchar * pbp = indicate_listener_server_get_dbuspath(pb->server);
+
+ if (g_strcmp0(pan, pbn) == 0)
+ return g_strcmp0(pap, pbp);
+ else
+ return 1;
}
static gint