diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-10-16 18:41:26 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-10-16 18:41:26 +0000 |
commit | 58ca874e460691615b131ad8692165a12f14bd09 (patch) | |
tree | ef172734a4185faec7fdd5e84e8c0bacdba87f04 | |
parent | f03a9fad41c07d68c692e7d53cd9c1fe374f33bc (diff) |
when warning about compat layer usage, link directly to a public CGI script I wrote which will show some information about the situation
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@789 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r-- | avahi-compat-howl/warn.c | 1 | ||||
-rw-r--r-- | avahi-compat-libdns_sd/warn.c | 21 |
2 files changed, 14 insertions, 8 deletions
diff --git a/avahi-compat-howl/warn.c b/avahi-compat-howl/warn.c index a792c98..4bff7ee 100644 --- a/avahi-compat-howl/warn.c +++ b/avahi-compat-howl/warn.c @@ -26,5 +26,6 @@ #include "warn.h" #define COMPAT_LAYER "HOWL" +#define CGI_SUBSYSTEM "howl" #include "../avahi-compat-libdns_sd/warn.c" diff --git a/avahi-compat-libdns_sd/warn.c b/avahi-compat-libdns_sd/warn.c index 72c101f..486447d 100644 --- a/avahi-compat-libdns_sd/warn.c +++ b/avahi-compat-libdns_sd/warn.c @@ -37,7 +37,11 @@ #ifndef COMPAT_LAYER #define COMPAT_LAYER "Apple Bonjour" -#endif +#endif + +#ifndef CGI_SUBSYSTEM +#define CGI_SUBSYSTEM "libdns_sd" +#endif static pthread_mutex_t linkage_mutex = PTHREAD_MUTEX_INITIALIZER; static int linkage_warning = 0; @@ -102,16 +106,17 @@ void avahi_warn_linkage(void) { linkage_warning = 1; pthread_mutex_unlock(&linkage_mutex); - if (!w && !getenv("AVAHI_COMPAT_NOWARN")) - avahi_warn("The programme '%s' uses the "COMPAT_LAYER" compatiblity layer of Avahi. " - "Please fix your application to use the native API of Avahi!", - avahi_exe_name()); + if (!w && !getenv("AVAHI_COMPAT_NOWARN")) { + avahi_warn("The programme '%s' uses the "COMPAT_LAYER" compatiblity layer of Avahi.", avahi_exe_name()); + avahi_warn("Please fix your application to use the native API of Avahi!"); + avahi_warn("For more information see <http://0pointer.de/avahi-compat?s="CGI_SUBSYSTEM"&e=%s>", avahi_exe_name()); + } } void avahi_warn_unsupported(const char *function) { - avahi_warn("The programme '%s' called '%s()' which is not supported (or only supported partially) in the "COMPAT_LAYER" compatiblity layer of Avahi. " - "Please fix your application to use the native API of Avahi!", - avahi_exe_name(), function); + avahi_warn("The programme '%s' called '%s()' which is not supported (or only supported partially) in the "COMPAT_LAYER" compatiblity layer of Avahi.", avahi_exe_name(), function); + avahi_warn("Please fix your application to use the native API of Avahi!"); + avahi_warn("For more information see <http://0pointer.de/avahi-compat?s="CGI_SUBSYSTEM"&e=%s&f=%s>", avahi_exe_name(), function); } |