diff --git a/bus/config-parser.c b/bus/config-parser.c index dbffd3f..1bfe8a3 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -2037,7 +2037,7 @@ include_file (BusConfigParser *parser, if (included == NULL) { - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); if (dbus_error_has_name (&tmp_error, DBUS_ERROR_FILE_NOT_FOUND) && ignore_missing) @@ -2053,7 +2053,7 @@ include_file (BusConfigParser *parser, } else { - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); if (!merge_included (parser, included, error)) { diff --git a/bus/connection.c b/bus/connection.c index df888f4..d843cd8 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -205,7 +205,7 @@ bus_connection_disconnected (DBusConnection *connection) if (!bus_service_remove_owner (service, connection, transaction, &error)) { - _DBUS_ASSERT_ERROR_IS_SET (&error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&error); if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) { diff --git a/bus/dispatch.c b/bus/dispatch.c index 185d7f8..d48ce90 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -270,7 +270,7 @@ bus_dispatch (DBusConnection *connection, if (!bus_activation_activate_service (activation, connection, transaction, TRUE, message, service_name, &error)) { - _DBUS_ASSERT_ERROR_IS_SET (&error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&error); _dbus_verbose ("bus_activation_activate_service() failed: %s\n", error.name); goto out; } diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index 7ece76e..b45de36 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -558,7 +558,7 @@ sha1_handle_first_client_response (DBusAuth *auth, } else { - _DBUS_ASSERT_ERROR_IS_SET (&error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&error); _dbus_verbose ("%s: Error loading keyring: %s\n", DBUS_AUTH_NAME (auth), error.message); if (send_rejected (auth)) @@ -579,7 +579,7 @@ sha1_handle_first_client_response (DBusAuth *auth, auth->cookie_id = _dbus_keyring_get_best_key (auth->keyring, &error); if (auth->cookie_id < 0) { - _DBUS_ASSERT_ERROR_IS_SET (&error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&error); _dbus_verbose ("%s: Could not get a cookie ID to send to client: %s\n", DBUS_AUTH_NAME (auth), error.message); if (send_rejected (auth)) @@ -870,7 +870,7 @@ handle_client_data_cookie_sha1_mech (DBusAuth *auth, } else { - _DBUS_ASSERT_ERROR_IS_SET (&error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&error); _dbus_verbose ("%s: Error loading keyring: %s\n", DBUS_AUTH_NAME (auth), error.message); diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 3fb6f36..cf9c21c 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -1790,7 +1790,7 @@ _dbus_connection_open_internal (const char *address, if (connection) break; - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); if (i == 0) dbus_move_error (&tmp_error, &first_error); @@ -1799,11 +1799,11 @@ _dbus_connection_open_internal (const char *address, } _DBUS_ASSERT_ERROR_IS_CLEAR (error); - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); if (connection == NULL) { - _DBUS_ASSERT_ERROR_IS_SET (&first_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&first_error); dbus_move_error (&first_error, error); } else diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 750882b..a872bba 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -167,9 +167,13 @@ extern const char _dbus_return_if_fail_warning_format[]; */ #define _DBUS_ASSERT_ERROR_IS_SET(error) #define _DBUS_ASSERT_ERROR_IS_CLEAR(error) +#define _DBUS_ASSERT_ERROR_CONTENT_IS_SET(error) +#define _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR(error) #else #define _DBUS_ASSERT_ERROR_IS_SET(error) _dbus_assert ((error) == NULL || dbus_error_is_set ((error))) #define _DBUS_ASSERT_ERROR_IS_CLEAR(error) _dbus_assert ((error) == NULL || !dbus_error_is_set ((error))) +#define _DBUS_ASSERT_ERROR_CONTENT_IS_SET(error) _dbus_assert (dbus_error_is_set ((error))) +#define _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR(error) _dbus_assert (!dbus_error_is_set ((error))) #endif #define _dbus_return_if_error_is_set(error) _dbus_return_if_fail ((error) == NULL || !dbus_error_is_set ((error))) diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index f5c8e7c..08110ba 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -573,14 +573,14 @@ dbus_server_listen (const char *address, if (result == DBUS_SERVER_LISTEN_OK) { _dbus_assert (server != NULL); - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); handled_once = TRUE; goto out; } else if (result == DBUS_SERVER_LISTEN_BAD_ADDRESS) { _dbus_assert (server == NULL); - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); dbus_move_error (&tmp_error, error); handled_once = TRUE; goto out; @@ -588,14 +588,14 @@ dbus_server_listen (const char *address, else if (result == DBUS_SERVER_LISTEN_NOT_HANDLED) { _dbus_assert (server == NULL); - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); /* keep trying addresses */ } else if (result == DBUS_SERVER_LISTEN_DID_NOT_CONNECT) { _dbus_assert (server == NULL); - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); if (!dbus_error_is_set (&first_connect_error)) dbus_move_error (&tmp_error, &first_connect_error); else @@ -648,7 +648,7 @@ dbus_server_listen (const char *address, dbus_move_error (&first_connect_error, error); } - _DBUS_ASSERT_ERROR_IS_CLEAR (&first_connect_error); /* be sure we freed it */ + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&first_connect_error); /* be sure we freed it */ _DBUS_ASSERT_ERROR_IS_SET (error); return NULL; diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index d8d3bb2..3c10e71 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -353,25 +353,25 @@ _dbus_transport_open (DBusAddressEntry *entry, { DBusTransportOpenResult result; - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); result = (* open_funcs[i].func) (entry, &transport, &tmp_error); switch (result) { case DBUS_TRANSPORT_OPEN_OK: - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); goto out; break; case DBUS_TRANSPORT_OPEN_NOT_HANDLED: - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); /* keep going through the loop of open funcs */ break; case DBUS_TRANSPORT_OPEN_BAD_ADDRESS: - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); goto out; break; case DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT: - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); goto out; break; } @@ -386,13 +386,13 @@ _dbus_transport_open (DBusAddressEntry *entry, NULL, NULL, "Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")"); - _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_SET (&tmp_error); dbus_move_error(&tmp_error, error); dbus_free (expected_guid); } else { - _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + _DBUS_ASSERT_ERROR_CONTENT_IS_CLEAR (&tmp_error); transport->expected_guid = expected_guid; }