From b9bb0f5d00084ab6452843002797f92db4806239 Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Mon, 6 Dec 2004 14:33:29 +0000 Subject: Merge from the main BK repository for ntp: put two midly annoying messages under #ifdef DEBUG. Merge of revision 1.45 by H. Stenn. Done on the vendor branch to minimise future imports. Reminded by: obrien --- contrib/ntp/ntpdate/ntpdate.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c index 398d19466038..b2cbe7e7e356 100644 --- a/contrib/ntp/ntpdate/ntpdate.c +++ b/contrib/ntp/ntpdate/ntpdate.c @@ -1339,7 +1339,10 @@ addserver( hints.ai_family = ai_fam_templ; hints.ai_socktype = SOCK_DGRAM; - printf("Looking for host %s and service %s\n", serv, service); +#ifdef DEBUG + if (debug) + printf("Looking for host %s and service %s\n", serv, service); +#endif error = getaddrinfo(serv, service, &hints, &addrResult); if (error != 0) { @@ -1347,9 +1350,11 @@ addserver( msyslog(LOG_ERR, "can't find host %s\n", serv); return; } - else { +#ifdef DEBUG + else if (debug) { fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr)); } +#endif server = (struct server *)emalloc(sizeof(struct server)); memset((char *)server, 0, sizeof(struct server)); -- cgit v1.2.3