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
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);
}
}
{
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);
}
}