diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-09 20:31:21 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-09 20:31:21 +0000 |
commit | 1708094c0e00ab433bb0a51981f8b77d24aee256 (patch) | |
tree | e30c5ca0f6011bb3f1a083b8a9b49ee778da0cbd /dbus/dbus-connection.c | |
parent | 0e1945b3889f8be8e31e39ad2b982c8a192be41d (diff) |
2003-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
a memory leak
* bus/dispatch.c (check_service_activated): fix bug in test
* dbus/dbus-mainloop.c (check_timeout): fix this up
* dbus/dbus-internals.c (_dbus_verbose_real): include PID in
verbose output so we can sort out output from different processes,
e.g. in the activation case.
Diffstat (limited to 'dbus/dbus-connection.c')
-rw-r--r-- | dbus/dbus-connection.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index d92268ba..60c075fe 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -1461,8 +1461,9 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, end_tv_sec += end_tv_usec / _DBUS_USEC_PER_SECOND; end_tv_usec = end_tv_usec % _DBUS_USEC_PER_SECOND; - _dbus_verbose ("will block %d milliseconds from %ld sec %ld usec to %ld sec %ld usec\n", + _dbus_verbose ("dbus_connection_send_with_reply_and_block(): will block %d milliseconds for reply serial %d from %ld sec %ld usec to %ld sec %ld usec\n", timeout_milliseconds, + client_serial, start_tv_sec, start_tv_usec, end_tv_sec, end_tv_usec); @@ -1489,6 +1490,10 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, if (reply != NULL) { dbus_mutex_unlock (connection->mutex); + + _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply %s\n", + dbus_message_get_name (reply)); + return reply; } } @@ -1504,7 +1509,7 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, { timeout_milliseconds = (end_tv_sec - tv_sec) * 1000 + (end_tv_usec - tv_usec) / 1000; - _dbus_verbose ("%d milliseconds remain\n", timeout_milliseconds); + _dbus_verbose ("dbus_connection_send_with_reply_and_block(): %d milliseconds remain\n", timeout_milliseconds); _dbus_assert (timeout_milliseconds >= 0); if (status == DBUS_DISPATCH_NEED_MEMORY) @@ -1513,6 +1518,8 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, * we may already have a reply in the buffer and just can't process * it. */ + _dbus_verbose ("dbus_connection_send_with_reply_and_block() waiting for more memory\n"); + if (timeout_milliseconds < 100) ; /* just busy loop */ else if (timeout_milliseconds <= 1000) @@ -1531,12 +1538,15 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, goto recheck_status; } + + _dbus_verbose ("dbus_connection_send_with_reply_and_block(): Waited %ld milliseconds and got no reply\n", + (tv_sec - start_tv_sec) * 1000 + (tv_usec - start_tv_usec) / 1000); if (dbus_connection_get_is_connected (connection)) dbus_set_error (error, DBUS_ERROR_NO_REPLY, "Message did not receive a reply"); else dbus_set_error (error, DBUS_ERROR_DISCONNECTED, "Disconnected prior to receiving a reply"); - + dbus_mutex_unlock (connection->mutex); return NULL; |