[Pkg-utopia-commits] r732 - in packages/unstable/dbus/debian: .
patches
Sjoerd Simons
sjoerd at costa.debian.org
Sun Mar 5 20:29:52 UTC 2006
Author: sjoerd
Date: 2006-03-05 20:29:51 +0000 (Sun, 05 Mar 2006)
New Revision: 732
Added:
packages/unstable/dbus/debian/patches/dbus-pendingcall-deadlock.patch
Modified:
packages/unstable/dbus/debian/changelog
Log:
* debian/patches/dbus-pendingcall-deadlock.patch
+ Added. Don't block in a poll if the data we're looking for was already
read by another connection. (From dbus CVS)
Modified: packages/unstable/dbus/debian/changelog
===================================================================
--- packages/unstable/dbus/debian/changelog 2006-03-05 20:17:13 UTC (rev 731)
+++ packages/unstable/dbus/debian/changelog 2006-03-05 20:29:51 UTC (rev 732)
@@ -2,8 +2,11 @@
* debian/patches/dbus-reload-usercache.patch
+ Added. Reload the user info cache when reloading the config.
+ * debian/patches/dbus-pendingcall-deadlock.patch
+ + Added. Don't block in a poll if the data we're looking for was already
+ read by another connection. (From dbus CVS)
- -- Sjoerd Simons <sjoerd at debian.org> Sun, 5 Mar 2006 18:09:15 +0100
+ -- Sjoerd Simons <sjoerd at debian.org> Sun, 5 Mar 2006 21:27:16 +0100
dbus (0.61-3) unstable; urgency=low
Added: packages/unstable/dbus/debian/patches/dbus-pendingcall-deadlock.patch
===================================================================
--- packages/unstable/dbus/debian/patches/dbus-pendingcall-deadlock.patch 2006-03-05 20:17:13 UTC (rev 731)
+++ packages/unstable/dbus/debian/patches/dbus-pendingcall-deadlock.patch 2006-03-05 20:29:51 UTC (rev 732)
@@ -0,0 +1,87 @@
+Index: dbus/dbus-connection.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
+retrieving revision 1.115
+retrieving revision 1.116
+diff -u -r1.115 -r1.116
+--- dbus/dbus-connection.c 30 Nov 2005 20:30:02 -0000 1.115
++++ dbus/dbus-connection.c 2 Mar 2006 22:24:28 -0000 1.116
+@@ -2533,6 +2533,36 @@
+ return NULL;
+ }
+
++static dbus_bool_t
++check_for_reply_and_update_dispatch_unlocked (DBusPendingCall *pending)
++{
++ DBusMessage *reply;
++ DBusDispatchStatus status;
++ DBusConnection *connection;
++
++ connection = pending->connection;
++
++ reply = check_for_reply_unlocked (connection, pending->reply_serial);
++ if (reply != NULL)
++ {
++ _dbus_verbose ("%s checked for reply\n", _DBUS_FUNCTION_NAME);
++
++ _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply\n");
++
++ _dbus_pending_call_complete_and_unlock (pending, reply);
++ dbus_message_unref (reply);
++
++ CONNECTION_LOCK (connection);
++ status = _dbus_connection_get_dispatch_status_unlocked (connection);
++ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
++ dbus_pending_call_unref (pending);
++
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
+ /**
+ * When a function that blocks has been called with a timeout, and we
+ * run out of memory, the time to wait for memory is based on the
+@@ -2616,6 +2646,11 @@
+ start_tv_sec, start_tv_usec,
+ end_tv_sec, end_tv_usec);
+
++ /* check to see if we already got the data off the socket */
++ /* from another blocked pending call */
++ if (check_for_reply_and_update_dispatch_unlocked (pending))
++ return;
++
+ /* Now we wait... */
+ /* always block at least once as we know we don't have the reply yet */
+ _dbus_connection_do_iteration_unlocked (connection,
+@@ -2645,27 +2680,8 @@
+ }
+
+ if (status == DBUS_DISPATCH_DATA_REMAINS)
+- {
+- DBusMessage *reply;
+-
+- reply = check_for_reply_unlocked (connection, client_serial);
+- if (reply != NULL)
+- {
+- _dbus_verbose ("%s checked for reply\n", _DBUS_FUNCTION_NAME);
+-
+- _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply\n");
+-
+- _dbus_pending_call_complete_and_unlock (pending, reply);
+- dbus_message_unref (reply);
+-
+- CONNECTION_LOCK (connection);
+- status = _dbus_connection_get_dispatch_status_unlocked (connection);
+- _dbus_connection_update_dispatch_status_and_unlock (connection, status);
+- dbus_pending_call_unref (pending);
+-
+- return;
+- }
+- }
++ if (check_for_reply_and_update_dispatch_unlocked (pending))
++ return;
+
+ _dbus_get_current_time (&tv_sec, &tv_usec);
+
More information about the Pkg-utopia-commits
mailing list