summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-connection.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-05 02:01:34 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-05 02:01:34 +0000
commit7e050c88719553d0c74e3dc68caf7bc50ae99590 (patch)
treef7a9abccae6591849e58e71d45dded9aa76512ec /dbus/dbus-connection.c
parent6bea42d2b84121152e4e5c719d23ed22901a972a (diff)
2003-03-04 Havoc Pennington <hp@pobox.com>
* test/data/auth/*: adapt to changes * dbus/dbus-auth-script.c (_dbus_auth_script_run): add USERID_BASE64 and change USERNAME_BASE64 to put in username not userid * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent more stuff from being in a context name, to make the protocol simpler to deal with * dbus/dbus-errors.c (dbus_error_has_name): new function (dbus_error_is_set): new function * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1 * dbus/dbus-connection.c (dbus_connection_flush): also read messages during a flush operation * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
Diffstat (limited to 'dbus/dbus-connection.c')
-rw-r--r--dbus/dbus-connection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 134736d2..3611b871 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -1367,9 +1367,16 @@ dbus_connection_send_message_with_reply_and_block (DBusConnection *connectio
void
dbus_connection_flush (DBusConnection *connection)
{
+ /* We have to specify DBUS_ITERATION_DO_READING here
+ * because otherwise we could have two apps deadlock
+ * if they are both doing a flush(), and the kernel
+ * buffers fill up.
+ */
+
dbus_mutex_lock (connection->mutex);
while (connection->n_outgoing > 0)
_dbus_connection_do_iteration (connection,
+ DBUS_ITERATION_DO_READING |
DBUS_ITERATION_DO_WRITING |
DBUS_ITERATION_BLOCK,
-1);