diff options
author | Havoc Pennington <hp@redhat.com> | 2003-03-25 04:37:08 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-03-25 04:37:08 +0000 |
commit | ce4fd314c6be9bfee16a172d5ca34e5097d309fc (patch) | |
tree | 744b8524f183a0fbb009d917029c9a129b34da9e /dbus/dbus-transport-debug.c | |
parent | 44fff656885ac32e319feb98fd0d06680d602977 (diff) |
2003-03-24 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
file
* dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
NULL argument for "message" if the error is a well-known one,
fill in a generic message in this case.
* dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
favor of DBusError
* bus/test.c (bus_test_flush_bus): add
* bus/policy.c (bus_policy_test): test code stub
Diffstat (limited to 'dbus/dbus-transport-debug.c')
-rw-r--r-- | dbus/dbus-transport-debug.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dbus/dbus-transport-debug.c b/dbus/dbus-transport-debug.c index d477339a..03b40593 100644 --- a/dbus/dbus-transport-debug.c +++ b/dbus/dbus-transport-debug.c @@ -307,28 +307,30 @@ _dbus_transport_debug_server_new (DBusTransport *client) * * @param server_name name of the server transport that * the client should try to connect to. - * @param result address where a result code can be returned. + * @param error address where an error can be returned. * @returns a new transport, or #NULL on failure. */ DBusTransport* _dbus_transport_debug_client_new (const char *server_name, - DBusResultCode *result) + DBusError *error) { DBusServer *debug_server; DBusTransportDebug *debug_transport; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); debug_server = _dbus_server_debug_lookup (server_name); if (!debug_server) { - dbus_set_result (result, DBUS_RESULT_NO_SERVER); + dbus_set_error (error, DBUS_ERROR_NO_SERVER, NULL); return NULL; } debug_transport = dbus_new0 (DBusTransportDebug, 1); if (debug_transport == NULL) { - dbus_set_result (result, DBUS_RESULT_NO_MEMORY); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } @@ -337,7 +339,7 @@ _dbus_transport_debug_client_new (const char *server_name, FALSE)) { dbus_free (debug_transport); - dbus_set_result (result, DBUS_RESULT_NO_MEMORY); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } @@ -345,7 +347,7 @@ _dbus_transport_debug_client_new (const char *server_name, { _dbus_transport_finalize_base (&debug_transport->base); dbus_free (debug_transport); - dbus_set_result (result, DBUS_RESULT_NO_MEMORY); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } @@ -355,7 +357,7 @@ _dbus_transport_debug_client_new (const char *server_name, _dbus_timeout_unref (debug_transport->timeout); _dbus_transport_finalize_base (&debug_transport->base); dbus_free (debug_transport); - dbus_set_result (result, DBUS_RESULT_NO_MEMORY); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } |