diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-10-13 21:12:24 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-10-13 21:12:24 +0000 |
commit | 100bcd121242c131b55c68aecdacec19921b61d9 (patch) | |
tree | 11a095b7fe687a2727c774c8768f42df303060f7 | |
parent | 92222fc5f94f61489b07541f3ee820caded1b89d (diff) |
* dbus-transport-socket.c (exchange_credentials):
Print out more detailed errors if reading or sending
credentials fail (Patch from Julio M. Merino Vidal
<jmmv at NetBSD dot org>)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | dbus/dbus-transport-socket.c | 15 |
2 files changed, 18 insertions, 4 deletions
@@ -1,5 +1,12 @@ 2006-10-13 John (J5) Palmieri <johnp@redhat.com> + * dbus-transport-socket.c (exchange_credentials): + Print out more detailed errors if reading or sending + credentials fail (Patch from Julio M. Merino Vidal + <jmmv at NetBSD dot org>) + +2006-10-13 John (J5) Palmieri <johnp@redhat.com> + * configure.in: when checking for posix getpwnam_r assume true for cross compiles diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 1e9fdc70..183604b7 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -338,17 +338,23 @@ exchange_credentials (DBusTransport *transport, dbus_bool_t do_writing) { DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport; + DBusError error; + _dbus_verbose ("exchange_credentials: do_reading = %d, do_writing = %d\n", + do_reading, do_writing); + + dbus_error_init (&error); if (do_writing && transport->send_credentials_pending) { if (_dbus_send_credentials_unix_socket (socket_transport->fd, - NULL)) + &error)) { transport->send_credentials_pending = FALSE; } else { - _dbus_verbose ("Failed to write credentials\n"); + _dbus_verbose ("Failed to write credentials: %s\n", error.message); + dbus_error_free (&error); do_io_error (transport); } } @@ -357,13 +363,14 @@ exchange_credentials (DBusTransport *transport, { if (_dbus_read_credentials_unix_socket (socket_transport->fd, &transport->credentials, - NULL)) + &error)) { transport->receive_credentials_pending = FALSE; } else { - _dbus_verbose ("Failed to read credentials\n"); + _dbus_verbose ("Failed to read credentials %s\n", error.message); + dbus_error_free (&error); do_io_error (transport); } } |