[Galago-commits] r2562 - in branches/libgalago/protocol-cleanup: . libgalago

galago-commits at freedesktop.org galago-commits at freedesktop.org
Tue Feb 7 00:50:40 PST 2006


Author: chipx86
Date: 2006-02-07 00:50:35 -0800 (Tue, 07 Feb 2006)
New Revision: 2562

Modified:
   branches/libgalago/protocol-cleanup/ChangeLog
   branches/libgalago/protocol-cleanup/libgalago/galago-presence.c
Log:
Retrieve the GalagoStatus's object path from the daemon, rather than setting it in libgalago. This is the last occurrence of libgalago setting object paths.


Modified: branches/libgalago/protocol-cleanup/ChangeLog
===================================================================
--- branches/libgalago/protocol-cleanup/ChangeLog	2006-02-06 09:11:15 UTC (rev 2561)
+++ branches/libgalago/protocol-cleanup/ChangeLog	2006-02-07 08:50:35 UTC (rev 2562)
@@ -1,3 +1,10 @@
+Tue Feb 07 00:48:17 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* libgalago/galago-presence.c:
+	  - Retrieve the GalagoStatus's object path from the daemon, rather than
+	    setting it in libgalago. This is the last occurrence of libgalago
+	    setting object paths.
+
 Mon Feb 06 00:18:31 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* libgalago/galago-core.c:

Modified: branches/libgalago/protocol-cleanup/libgalago/galago-presence.c
===================================================================
--- branches/libgalago/protocol-cleanup/libgalago/galago-presence.c	2006-02-06 09:11:15 UTC (rev 2561)
+++ branches/libgalago/protocol-cleanup/libgalago/galago-presence.c	2006-02-07 08:50:35 UTC (rev 2562)
@@ -462,10 +462,17 @@
 		return;
 	}
 
-	if (GALAGO_OBJECT_IS_LOCAL(person) && galago_is_connected())
+	if (GALAGO_OBJECT_IS_LOCAL(person) && galago_is_connected() &&
+		galago_is_feed())
 	{
-		char *obj_path = g_strdup_printf("%s/%s",
-			galago_object_get_dbus_path(GALAGO_OBJECT(presence)), status_id);
+		char *obj_path = galago_dbus_send_message_with_reply(
+			GALAGO_OBJECT(presence), "AddStatus",
+			galago_value_new(GALAGO_VALUE_TYPE_STRING, NULL, NULL),
+			galago_value_new_object(GALAGO_TYPE_STATUS, G_OBJECT(status)),
+			NULL);
+
+		g_assert(obj_path != NULL);
+
 		galago_object_set_dbus_path(GALAGO_OBJECT(status), obj_path);
 		g_free(obj_path);
 	}
@@ -486,14 +493,6 @@
 
 	galago_status_set_presence(status, presence);
 
-	if (GALAGO_OBJECT_IS_LOCAL(person) && galago_is_connected() &&
-		galago_is_feed())
-	{
-		galago_dbus_send_message(GALAGO_OBJECT(presence), "AddStatus",
-			galago_value_new_object(GALAGO_TYPE_STATUS, G_OBJECT(status)),
-			NULL);
-	}
-
 	g_signal_emit(presence, signals[STATUS_ADDED], 0, status);
 	g_signal_emit(presence, signals[CHANGED], 0);
 }



More information about the galago-commits mailing list