Improve syslog

Only print a message when dns resolution changed - usually once when the
machine logs for the first time.  Also print a human-readable ip
address.  The hex number was pretty much unusable.

Signed-off-by: Joern Engel <joern@logfs.org>
diff --git a/cancd.c b/cancd.c
index 26f2e9b..a59f18b 100644
--- a/cancd.c
+++ b/cancd.c
@@ -750,8 +750,14 @@
 	}
 	old = sip->filename;
 	sip->filename = new;
+	if (!old || !new || strcmp(old, new))
+		syslog(LOG_INFO, "resolved %u.%u.%u.%u to %s",
+			(ip >> 0) & 0xff,
+			(ip >> 8) & 0xff,
+			(ip >> 16) & 0xff,
+			(ip >> 24) & 0xff,
+			sip->filename);
 	free((void *)old);
-	syslog(LOG_INFO, "resolved %08x to %s", ip, sip->filename);
 }
 
 void *dns_thread_func(void *_arg)