From 8782ae678cf60713b5513016f16b039251c40870 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 Sep 2005 00:07:05 +0000 Subject: * rename some DBUS errrors * add new VERSION_MISMATCH error git-svn-id: file:///home/lennart/svn/public/avahi/trunk@630 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-common/dbus.c | 3 ++- avahi-common/dbus.h | 9 +++++---- avahi-common/error.c | 3 ++- avahi-common/error.h | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) (limited to 'avahi-common') diff --git a/avahi-common/dbus.c b/avahi-common/dbus.c index 28428ed..14d1b2b 100644 --- a/avahi-common/dbus.c +++ b/avahi-common/dbus.c @@ -62,7 +62,8 @@ static const char * const table[- AVAHI_ERR_MAX] = { AVAHI_DBUS_ERR_INVALID_PROTOCOL, AVAHI_DBUS_ERR_INVALID_FLAGS, AVAHI_DBUS_ERR_NOT_FOUND, - AVAHI_DBUS_ERR_INVALID_CONFIG + AVAHI_DBUS_ERR_INVALID_CONFIG, + AVAHI_DBUS_ERR_VERSION_MISMATCH }; int avahi_error_dbus_to_number(const char *s) { diff --git a/avahi-common/dbus.h b/avahi-common/dbus.h index cd90af1..5f2acff 100644 --- a/avahi-common/dbus.h +++ b/avahi-common/dbus.h @@ -69,10 +69,11 @@ AVAHI_C_DECL_BEGIN #define AVAHI_DBUS_ERR_INVALID_OBJECT "org.freedesktop.Avahi.InvalidObjectError" #define AVAHI_DBUS_ERR_NO_DAEMON "org.freedesktop.Avahi.NoDaemonError" #define AVAHI_DBUS_ERR_INVALID_INTERFACE "org.freedesktop.Avahi.InvalidInterfaceError" -#define AVAHI_DBUS_ERR_INVALID_PROTOCOL "org.freedesktop.Avahi.InvalidInterfaceProtocol" -#define AVAHI_DBUS_ERR_INVALID_FLAGS "org.freedesktop.Avahi.InvalidFlags" -#define AVAHI_DBUS_ERR_NOT_FOUND "org.freedesktop.Avahi.NotFound" -#define AVAHI_DBUS_ERR_INVALID_CONFIG "org.freedesktop.Avahi.InvalidConfiguration" +#define AVAHI_DBUS_ERR_INVALID_PROTOCOL "org.freedesktop.Avahi.InvalidInterfaceProtocolError" +#define AVAHI_DBUS_ERR_INVALID_FLAGS "org.freedesktop.Avahi.InvalidFlagsError" +#define AVAHI_DBUS_ERR_NOT_FOUND "org.freedesktop.Avahi.NotFoundError" +#define AVAHI_DBUS_ERR_INVALID_CONFIG "org.freedesktop.Avahi.InvalidConfigurationError" +#define AVAHI_DBUS_ERR_VERSION_MISMATCH "org.freedesktop.Avahi.VersionMismatchError" /** 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 73f13d2..4242361 100644 --- a/avahi-common/error.c +++ b/avahi-common/error.c @@ -59,7 +59,8 @@ const char *avahi_strerror(int error) { "Invalid protocol specification", "Invalid flags", "Not found", - "Invalid configuration" + "Invalid configuration", + "Version mismatch" }; if (-error < 0 || -error >= -AVAHI_ERR_MAX) diff --git a/avahi-common/error.h b/avahi-common/error.h index 2b06c5a..851c600 100644 --- a/avahi-common/error.h +++ b/avahi-common/error.h @@ -64,6 +64,7 @@ enum { AVAHI_ERR_INVALID_FLAGS = -29, /**< Invalid flags */ AVAHI_ERR_NOT_FOUND = -30, /**< Not found */ AVAHI_ERR_INVALID_CONFIG = -31, /**< Configuration error */ + AVAHI_ERR_VERSION_MISMATCH = -32, /**< Verson mismatch */ /**** **** IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD @@ -73,7 +74,7 @@ enum { **** Also remember to update the MAX value below. ****/ - AVAHI_ERR_MAX = -32 + AVAHI_ERR_MAX = -33 }; /** Return a human readable error string for the specified error code */ -- cgit