From: Jiří Klimeš Date: Fri, 1 Jul 2011 10:58:11 +0000 (+0200) Subject: DBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE X-Git-Tag: dbus-1.4.14~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dcb9112519d43f00efd7d1f86981d12b25edbc5;p=thirdparty%2Fdbus.git DBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE While registering an object path the possible error is DBUS_ERROR_OBJECT_PATH_IN_USE, not DBUS_ERROR_ADDRESS_IN_USE (the error is set by _dbus_object_tree_register()). Signed-off-by: Jiří Klimeš Reviewed-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38874 --- diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index c2720e7b8..0201cfef0 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -5516,7 +5516,7 @@ dbus_connection_remove_filter (DBusConnection *connection, * @param user_data data to pass to functions in the vtable * @param error address where an error can be returned * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or - * #DBUS_ERROR_ADDRESS_IN_USE) is reported + * #DBUS_ERROR_OBJECT_PATH_IN_USE) is reported */ dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, @@ -5562,7 +5562,8 @@ dbus_connection_try_register_object_path (DBusConnection *connectio * @param path a '/' delimited string of path elements * @param vtable the virtual table * @param user_data data to pass to functions in the vtable - * @returns #FALSE if not enough memory + * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or + * #DBUS_ERROR_OBJECT_PATH_IN_USE) ocurred */ dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, @@ -5593,7 +5594,7 @@ dbus_connection_register_object_path (DBusConnection *connection, dbus_free_string_array (decomposed_path); - if (dbus_error_has_name (&error, DBUS_ERROR_ADDRESS_IN_USE)) + if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE)) { _dbus_warn ("%s\n", error.message); dbus_error_free (&error); @@ -5615,7 +5616,7 @@ dbus_connection_register_object_path (DBusConnection *connection, * @param user_data data to pass to functions in the vtable * @param error address where an error can be returned * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or - * #DBUS_ERROR_ADDRESS_IN_USE) is reported + * #DBUS_ERROR_OBJECT_PATH_IN_USE) is reported */ dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, @@ -5663,7 +5664,8 @@ dbus_connection_try_register_fallback (DBusConnection *connection, * @param path a '/' delimited string of path elements * @param vtable the virtual table * @param user_data data to pass to functions in the vtable - * @returns #FALSE if not enough memory + * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or + * #DBUS_ERROR_OBJECT_PATH_IN_USE) occured */ dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, @@ -5694,7 +5696,7 @@ dbus_connection_register_fallback (DBusConnection *connection, dbus_free_string_array (decomposed_path); - if (dbus_error_has_name (&error, DBUS_ERROR_ADDRESS_IN_USE)) + if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE)) { _dbus_warn ("%s\n", error.message); dbus_error_free (&error);