]> git.meshlink.io Git - catta/commitdiff
add missing error codes to some places where they belong
authorLennart Poettering <lennart@poettering.net>
Sat, 13 Aug 2005 21:34:17 +0000 (21:34 +0000)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Aug 2005 21:34:17 +0000 (21:34 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@309 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-common/dbus.h
avahi-common/error.h
avahi-daemon/dbus-protocol.c

index facd7b2f13bfbf6f71c32743623cf5661f864445..fc8dc02a2b18a20f473489a564067410436913e0 100644 (file)
@@ -57,6 +57,9 @@ AVAHI_C_DECL_BEGIN
 #define AVAHI_DBUS_ERR_OS "org.freedesktop.Avahi.OSError"
 #define AVAHI_DBUS_ERR_ACCESS_DENIED DBUS_ERROR_ACCESS_DENIED
 #define AVAHI_DBUS_ERR_INVALID_OPERATION "org.freedesktop.Avahi.InvalidOperationError"
+#define AVAHI_DBUS_ERR_DBUS_ERROR "org.freedesktop.Avahi.DBusError"
+#define AVAHI_DBUS_ERR_NOT_CONNECTED "org.freedesktop.Avahi.NotConnectedError"
+#define AVAHI_DBUS_ERR_NO_MEMORY "org.freedesktop.Avahi.NoMemoryError"
 
 AVAHI_C_DECL_END
 
index 943b49c6463d5046ce28855b18ef00182c8718e3..c94946670b1e130af2aff63503fffc6c61f4ad61 100644 (file)
@@ -54,7 +54,15 @@ enum {
     AVAHI_ERR_INVALID_OPERATION = -21,     /**< Invalid operation */
     AVAHI_ERR_DBUS_ERROR = -22,            /**< An unexpected DBUS error occured */
     AVAHI_ERR_NOT_CONNECTED = -23,         /**< Could not get a connection to the daemon */
-    AVAHI_ERR_NO_MEMORY = -24,             /**< Memory exhausted */ 
+    AVAHI_ERR_NO_MEMORY = -24,             /**< Memory exhausted */
+
+    /****
+     ****    IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD
+     ****    IT TO THE STRING ARRAY IN avahi_strerror() AND TO THE ARRAY
+     ****    IN respond_error() IN dbus-protocol.c AND FINALLY TO
+     ****    dbus.h!
+     ****/
+    
     AVAHI_ERR_MAX = -25
 };
 
index 6526d7dc03cc426f803206020ac973e74d1ccc5b..117f30f522e99f5f83b2a57fe5dbf4f7402ebee9 100644 (file)
@@ -346,7 +346,10 @@ static DBusHandlerResult respond_error(DBusConnection *c, DBusMessage *m, gint e
         AVAHI_DBUS_ERR_TOO_MANY_ENTRIES,
         AVAHI_DBUS_ERR_OS,
         AVAHI_DBUS_ERR_ACCESS_DENIED,
-        AVAHI_DBUS_ERR_INVALID_OPERATION
+        AVAHI_DBUS_ERR_INVALID_OPERATION,
+        AVAHI_DBUS_ERR_DBUS_ERROR,
+        AVAHI_DBUS_ERR_NOT_CONNECTED,
+        AVAHI_DBUS_ERR_NO_MEMORY
     };
 
     g_assert(-error > -AVAHI_OK);