From d8f7b96b39016dc6976a80d46eaebea950b89b55 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 2 Jul 2008 20:32:39 +0000 Subject: Version 0.2 --- tools/notify-dns-slaves.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') diff --git a/tools/notify-dns-slaves.c b/tools/notify-dns-slaves.c index a21ca1b..dfe74d1 100644 --- a/tools/notify-dns-slaves.c +++ b/tools/notify-dns-slaves.c @@ -136,6 +136,7 @@ typedef struct _notification { static notification *the_notifications = NULL; #define WHITESPACE " \t\r\n\v" +#define LOG_NORMAL 1 /* -------------------------------------------------------------------------------- * WARNINGS AND LOGGING @@ -148,8 +149,10 @@ vmessage(int level, int erno, const char* msg, va_list ap) char buf[MAX_MSGLEN]; size_t len; +#if LOG_NORMAL if(debug_level < level) return; +#endif assert (msg); @@ -166,7 +169,9 @@ vmessage(int level, int erno, const char* msg, va_list ap) } /* Either to syslog or stderr */ +#if LOG_NORMAL if (is_helper && level != LOG_DEBUG) +#endif vsyslog (level, buf, ap); vwarnx (buf, ap); @@ -435,6 +440,9 @@ address_resolved (int ecode, struct addrinfo *ai, void *arg) for (not = &the_notifications; *not; not = &(*not)->next) { notif = *not; + if (arg != notif) + continue; + /* A bummer resolve */ if (ecode) { warningx ("couldn't resolve server: %s: %s", -- cgit v1.2.3