add new error code AVAHI_ERR_NO_CHANGE
authorLennart Poettering <lennart@poettering.net>
Wed, 23 Aug 2006 23:35:46 +0000 (23:35 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 23 Aug 2006 23:35:46 +0000 (23:35 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1266 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

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

index e044b53..ac54848 100644 (file)
@@ -88,7 +88,8 @@ static const char * const table[- AVAHI_ERR_MAX] = {
 
     AVAHI_DBUS_ERR_NOT_PERMITTED,
     AVAHI_DBUS_ERR_INVALID_ARGUMENT,
-    AVAHI_DBUS_ERR_IS_EMPTY
+    AVAHI_DBUS_ERR_IS_EMPTY,
+    AVAHI_DBUS_ERR_NO_CHANGE
 };
 
 struct error_map {
index 39718d1..f11eb17 100644 (file)
@@ -108,6 +108,7 @@ Avahi 0.6.1 implements API version 0x0202 */
 #define AVAHI_DBUS_ERR_NOT_PERMITTED "org.freedesktop.Avahi.NotPermittedError"
 #define AVAHI_DBUS_ERR_INVALID_ARGUMENT "org.freedesktop.Avahi.InvalidArgumentError"
 #define AVAHI_DBUS_ERR_IS_EMPTY "org.freedesktop.Avahi.IsEmptyError"
+#define AVAHI_DBUS_ERR_NO_CHANGE "org.freedesktop.Avahi.NoChangeError"
 
 /** Convert a DBus error string into an Avahi error number */
 int avahi_error_dbus_to_number(const char *s);
index f6f561a..53ff4f2 100644 (file)
@@ -85,7 +85,8 @@ const char *avahi_strerror(int error) {
 
         "Not permitted",
         "Invalid argument",
-       "Is empty"
+       "Is empty",
+        "The requested operation is invalid because redundant"
     };
 
     if (-error < 0 || -error >= -AVAHI_ERR_MAX)
index 2cf3bc2..ee0626f 100644 (file)
@@ -88,6 +88,7 @@ enum {
     AVAHI_ERR_NOT_PERMITTED = -50,           /**< Operation not permitted */
     AVAHI_ERR_INVALID_ARGUMENT = -51,        /**< Invalid argument */
     AVAHI_ERR_IS_EMPTY = -52,                /**< Is empty */
+    AVAHI_ERR_NO_CHANGE = -53,               /**< The requested operation is invalid because redundant */
     
     /****
      ****    IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD
@@ -97,7 +98,7 @@ enum {
      ****    Also remember to update the MAX value below.
      ****/
     
-    AVAHI_ERR_MAX = -53
+    AVAHI_ERR_MAX = -54
 };
 
 /** Return a human readable error string for the specified error code */