From 83d9a20d5add460cba13dcd0d767dbb7bd8c5916 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 23 Aug 2006 23:35:46 +0000 Subject: add new error code AVAHI_ERR_NO_CHANGE git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1266 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-common/dbus.c | 3 ++- avahi-common/dbus.h | 1 + avahi-common/error.c | 3 ++- avahi-common/error.h | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/avahi-common/dbus.c b/avahi-common/dbus.c index e044b53..ac54848 100644 --- a/avahi-common/dbus.c +++ b/avahi-common/dbus.c @@ -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 { diff --git a/avahi-common/dbus.h b/avahi-common/dbus.h index 39718d1..f11eb17 100644 --- a/avahi-common/dbus.h +++ b/avahi-common/dbus.h @@ -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); diff --git a/avahi-common/error.c b/avahi-common/error.c index f6f561a..53ff4f2 100644 --- a/avahi-common/error.c +++ b/avahi-common/error.c @@ -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) diff --git a/avahi-common/error.h b/avahi-common/error.h index 2cf3bc2..ee0626f 100644 --- a/avahi-common/error.h +++ b/avahi-common/error.h @@ -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 */ -- cgit