[maemo-commits] [maemo-commits] r10956 - in projects/haf/trunk/dbus-glib/debian: . patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Apr 4 14:01:23 EEST 2007
- Previous message: [maemo-commits] r10955 - in projects/haf/trunk/libhildonmime: . libhildonmime tests
- Next message: [maemo-commits] r10957 - projects/haf/trunk/dbus-glib/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2007-04-04 14:01:22 +0300 (Wed, 04 Apr 2007) New Revision: 10956 Added: projects/haf/trunk/dbus-glib/debian/patches/08-add_dbus_connection_get_g_connection.patch projects/haf/trunk/dbus-glib/debian/patches/09-support-peer-to-peer-proxies.patch Modified: projects/haf/trunk/dbus-glib/debian/changelog Log: added two patches from Ross Burton Modified: projects/haf/trunk/dbus-glib/debian/changelog =================================================================== --- projects/haf/trunk/dbus-glib/debian/changelog 2007-04-04 10:10:10 UTC (rev 10955) +++ projects/haf/trunk/dbus-glib/debian/changelog 2007-04-04 11:01:22 UTC (rev 10956) @@ -1,3 +1,12 @@ +dbus-glib (0.73-0osso2) experimental; urgency=low + + * UNRELEASED + * Added two patches from Ross Burton: one to add + dbus_connection_get_g_connection and another to fix a bug in peer-to-peer + proxy support. Fixes: NB#53688 + + -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Wed, 04 Apr 2007 14:00:25 +0300 + dbus-glib (0.73-0osso1) experimental; urgency=low * Upgraded the upstream tarball to v0.73. Added: projects/haf/trunk/dbus-glib/debian/patches/08-add_dbus_connection_get_g_connection.patch =================================================================== --- projects/haf/trunk/dbus-glib/debian/patches/08-add_dbus_connection_get_g_connection.patch 2007-04-04 10:10:10 UTC (rev 10955) +++ projects/haf/trunk/dbus-glib/debian/patches/08-add_dbus_connection_get_g_connection.patch 2007-04-04 11:01:22 UTC (rev 10956) @@ -0,0 +1,94 @@ +--- a/dbus/dbus-glib-lowlevel.h ++++ b/dbus/dbus-glib-lowlevel.h +@@ -49,6 +49,7 @@ void dbus_g_proxy_send (DBusGProxy *p + dbus_uint32_t *client_serial); + + DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection); ++DBusGConnection* dbus_connection_get_g_connection (DBusConnection *connection); + DBusMessage* dbus_g_message_get_message (DBusGMessage *gmessage); + + /* dbus_g_pending_call_get_pending_call() deliberately skipped for now; +--- a/dbus/dbus-glib.c ++++ b/dbus/dbus-glib.c +@@ -305,9 +305,33 @@ dbus_g_message_get_g_type (void) + DBusConnection* + dbus_g_connection_get_connection (DBusGConnection *gconnection) + { ++ g_return_val_if_fail (gconnection, NULL); + return DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); + } + ++extern dbus_int32_t _dbus_gmain_connection_slot; ++ ++/** ++ * dbus_connection_get_g_connection: ++ * @connection: a #DBusConnection ++ * ++ * Get the #DBusGConnection corresponding to this #DBusConnection. This only ++ * makes sense if the #DBusConnection was originally a #DBusGConnection that was ++ * registered with the GLib main loop. The return value does not have its ++ * refcount incremented. ++ * ++ * Returns: #DBusGConnection ++ */ ++DBusGConnection* ++dbus_connection_get_g_connection (DBusConnection *connection) ++{ ++ g_return_val_if_fail (connection, NULL); ++ g_return_val_if_fail (dbus_connection_get_data (connection, _dbus_gmain_connection_slot), NULL); ++ ++ return DBUS_G_CONNECTION_FROM_CONNECTION (connection); ++} ++ ++ + /** + * dbus_g_message_get_message: + * @gmessage: a #DBusGMessage +--- a/dbus/dbus-gmain.c ++++ b/dbus/dbus-gmain.c +@@ -129,7 +129,7 @@ typedef struct + DBusTimeout *timeout; + } TimeoutHandler; + +-static dbus_int32_t connection_slot = -1; ++dbus_int32_t _dbus_gmain_connection_slot = -1; + static dbus_int32_t server_slot = -1; + + static ConnectionSetup* +@@ -560,8 +560,8 @@ dbus_connection_setup_with_g_main (DBusC + /* FIXME we never free the slot, so its refcount just keeps growing, + * which is kind of broken. + */ +- dbus_connection_allocate_data_slot (&connection_slot); +- if (connection_slot < 0) ++ dbus_connection_allocate_data_slot (&_dbus_gmain_connection_slot); ++ if (_dbus_gmain_connection_slot < 0) + goto nomem; + + if (context == NULL) +@@ -569,7 +569,7 @@ dbus_connection_setup_with_g_main (DBusC + + cs = NULL; + +- old_setup = dbus_connection_get_data (connection, connection_slot); ++ old_setup = dbus_connection_get_data (connection, _dbus_gmain_connection_slot); + if (old_setup != NULL) + { + if (old_setup->context == context) +@@ -578,14 +578,14 @@ dbus_connection_setup_with_g_main (DBusC + cs = connection_setup_new_from_old (context, old_setup); + + /* Nuke the old setup */ +- dbus_connection_set_data (connection, connection_slot, NULL, NULL); ++ dbus_connection_set_data (connection, _dbus_gmain_connection_slot, NULL, NULL); + old_setup = NULL; + } + + if (cs == NULL) + cs = connection_setup_new (context, connection); + +- if (!dbus_connection_set_data (connection, connection_slot, cs, ++ if (!dbus_connection_set_data (connection, _dbus_gmain_connection_slot, cs, + (DBusFreeFunction)connection_setup_free)) + goto nomem; + Added: projects/haf/trunk/dbus-glib/debian/patches/09-support-peer-to-peer-proxies.patch =================================================================== --- projects/haf/trunk/dbus-glib/debian/patches/09-support-peer-to-peer-proxies.patch 2007-04-04 10:10:10 UTC (rev 10955) +++ projects/haf/trunk/dbus-glib/debian/patches/09-support-peer-to-peer-proxies.patch 2007-04-04 11:01:22 UTC (rev 10956) @@ -0,0 +1,76 @@ +--- a/dbus/dbus-gproxy.c ++++ b/dbus/dbus-gproxy.c +@@ -930,23 +930,23 @@ dbus_g_proxy_manager_register (DBusGProx + list->name, list); + } + +- if (list->proxies == NULL) ++ if (list->proxies == NULL && priv->name) + { + /* We have to add the match rule to the server, +- * but FIXME only if the server is a message bus, ++ * but only if the server is a message bus, + * not if it's a peer. + */ +- char *rule; +- +- rule = g_proxy_get_match_rule (proxy); +- +- /* We don't check for errors; it's not like anyone would handle them, +- * and we don't want a round trip here. +- */ +- dbus_bus_add_match (manager->connection, +- rule, NULL); +- +- g_free (rule); ++ char *rule; ++ ++ rule = g_proxy_get_match_rule (proxy); ++ ++ /* We don't check for errors; it's not like anyone would handle them, and ++ * we don't want a round trip here. ++ */ ++ dbus_bus_add_match (manager->connection, ++ rule, NULL); ++ ++ g_free (rule); + } + + g_assert (g_slist_find (list->proxies, proxy) == NULL); +@@ -1198,7 +1198,6 @@ dbus_g_proxy_manager_filter (DBusConnect + sender = dbus_message_get_sender (message); + + /* dbus spec requires these, libdbus validates */ +- g_assert (sender != NULL); + g_assert (dbus_message_get_path (message) != NULL); + g_assert (dbus_message_get_interface (message) != NULL); + g_assert (dbus_message_get_member (message) != NULL); +@@ -1219,7 +1218,7 @@ dbus_g_proxy_manager_filter (DBusConnect + + g_free (tri); + +- if (manager->owner_names) ++ if (manager->owner_names && sender) + { + owned_names = g_hash_table_lookup (manager->owner_names, sender); + for (tmp = owned_names; tmp; tmp = tmp->next) +@@ -1342,7 +1341,6 @@ dbus_g_proxy_constructor (GType + * on these parameters being provided. unfortunately we can't assert + * for manager because it's allowed to be NULL when tha mangager is + * setting up a bus proxy for its own calls */ +- g_assert (priv->name != NULL); + g_assert (priv->path != NULL); + g_assert (priv->interface != NULL); + +@@ -1498,7 +1496,10 @@ dbus_g_proxy_set_property (GObject *obje + { + case PROP_NAME: + priv->name = g_strdup (g_value_get_string (value)); +- priv->for_owner = (priv->name[0] == ':'); ++ if (priv->name) ++ priv->for_owner = (priv->name[0] == ':'); ++ else ++ priv->for_owner = TRUE; + break; + case PROP_PATH: + priv->path = g_strdup (g_value_get_string (value));
- Previous message: [maemo-commits] r10955 - in projects/haf/trunk/libhildonmime: . libhildonmime tests
- Next message: [maemo-commits] r10957 - projects/haf/trunk/dbus-glib/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]