[maemo-commits] [maemo-commits] r14649 - projects/haf/trunk/dbus/debian/patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Oct 29 09:02:59 EET 2007
- Previous message: [maemo-commits] r14648 - projects/haf/trunk/dbus/debian/patches
- Next message: [maemo-commits] r14650 - in projects/haf/trunk/osso-app-killer: debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2007-10-29 09:02:56 +0200 (Mon, 29 Oct 2007) New Revision: 14649 Modified: projects/haf/trunk/dbus/debian/patches/35-unref-no-guid-connections.patch Log: beautifications Modified: projects/haf/trunk/dbus/debian/patches/35-unref-no-guid-connections.patch =================================================================== --- projects/haf/trunk/dbus/debian/patches/35-unref-no-guid-connections.patch 2007-10-29 06:33:53 UTC (rev 14648) +++ projects/haf/trunk/dbus/debian/patches/35-unref-no-guid-connections.patch 2007-10-29 07:02:56 UTC (rev 14649) @@ -1,19 +1,17 @@ diff -pur dbus-1.0.2/dbus/dbus-connection.c dbus-1.0.2.new/dbus/dbus-connection.c --- dbus-1.0.2/dbus/dbus-connection.c 2006-12-11 21:21:08.000000000 +0200 -+++ dbus-1.0.2.new/dbus/dbus-connection.c 2007-10-26 16:21:04.047254488 +0300 -@@ -1434,6 +1434,27 @@ _dbus_connection_handle_watch (DBusWatch ++++ dbus-1.0.2.new/dbus/dbus-connection.c 2007-10-29 09:01:00.664474456 +0200 +@@ -1434,6 +1434,23 @@ _dbus_connection_handle_watch (DBusWatch _DBUS_DEFINE_GLOBAL_LOCK (shared_connections); static DBusHashTable *shared_connections = NULL; -+static DBusList *no_guid_connections = NULL; ++static DBusList *shared_connections_no_guid = NULL; + +static void -+connection_shutdown_helper (DBusConnection *connection) ++close_connection_on_shutdown (DBusConnection *connection) +{ + DBusMessage *message; + -+ _DBUS_UNLOCK (shared_connections); -+ + dbus_connection_ref (connection); + _dbus_connection_close_possibly_shared (connection); + @@ -23,13 +21,11 @@ + dbus_message_unref (message); + } + dbus_connection_unref (connection); -+ -+ _DBUS_LOCK (shared_connections); +} static void shared_connections_shutdown (void *data) -@@ -1446,7 +1467,6 @@ shared_connections_shutdown (void *data) +@@ -1446,7 +1463,6 @@ shared_connections_shutdown (void *data) while ((n_entries = _dbus_hash_table_get_n_entries (shared_connections)) > 0) { DBusConnection *connection; @@ -37,11 +33,10 @@ DBusHashIter iter; _dbus_hash_iter_init (shared_connections, &iter); -@@ -1454,19 +1474,7 @@ shared_connections_shutdown (void *data) - +@@ -1455,17 +1471,7 @@ shared_connections_shutdown (void *data) connection = _dbus_hash_iter_get_value (&iter); -- _DBUS_UNLOCK (shared_connections); + _DBUS_UNLOCK (shared_connections); - - dbus_connection_ref (connection); - _dbus_connection_close_possibly_shared (connection); @@ -53,28 +48,29 @@ - } - dbus_connection_unref (connection); - -- _DBUS_LOCK (shared_connections); -+ connection_shutdown_helper (connection); ++ close_connection_on_shutdown (connection); + _DBUS_LOCK (shared_connections); /* The connection should now be dead and not in our hash ... */ - _dbus_assert (_dbus_hash_table_get_n_entries (shared_connections) < n_entries); -@@ -1476,6 +1484,19 @@ shared_connections_shutdown (void *data) +@@ -1476,6 +1482,21 @@ shared_connections_shutdown (void *data) _dbus_hash_table_unref (shared_connections); shared_connections = NULL; + -+ if (no_guid_connections != NULL) ++ if (shared_connections_no_guid != NULL) + { + DBusConnection *connection; -+ connection = _dbus_list_pop_first (&no_guid_connections); ++ connection = _dbus_list_pop_first (&shared_connections_no_guid); + while (connection != NULL) + { -+ connection_shutdown_helper (connection); -+ connection = _dbus_list_pop_first (&no_guid_connections); ++ _DBUS_UNLOCK (shared_connections); ++ close_connection_on_shutdown (connection); ++ _DBUS_LOCK (shared_connections); ++ connection = _dbus_list_pop_first (&shared_connections_no_guid); + } + } + -+ no_guid_connections = NULL; ++ shared_connections_no_guid = NULL; _DBUS_UNLOCK (shared_connections); } @@ -86,7 +82,7 @@ + { + _DBUS_LOCK (shared_connections); + -+ if (!_dbus_list_prepend (&no_guid_connections, connection)) ++ if (!_dbus_list_prepend (&shared_connections_no_guid, connection)) + { + _DBUS_UNLOCK (shared_connections); + return FALSE;
- Previous message: [maemo-commits] r14648 - projects/haf/trunk/dbus/debian/patches
- Next message: [maemo-commits] r14650 - in projects/haf/trunk/osso-app-killer: debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]