From: Harlan Stenn Date: Tue, 11 Jan 2011 05:34:29 +0000 (+0000) Subject: cleanup X-Git-Tag: NTP_4_2_7P131~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fab767f3149866df6e9abe23a75af6c2ba3aa27d;p=thirdparty%2Fntp.git cleanup bk: 4d2bebe5aVXn4q4Sq5L81S2oy9vDzg --- diff --git a/sntp/kod_management.c b/sntp/kod_management.c index c0d9f2174..d98204e40 100644 --- a/sntp/kod_management.c +++ b/sntp/kod_management.c @@ -176,7 +176,7 @@ kod_init_kod_db( atexit(write_kod_db); - DPRINTF(2, ("Initializing KOD DB...")); + DPRINTF(2, ("Initializing KOD DB...\n")); kod_db_file = estrdup(db_file); @@ -223,7 +223,7 @@ kod_init_kod_db( } if (0 == kod_db_cnt) { - DPRINTF(2, ("KoD DB %s empty.", db_file)); + DPRINTF(2, ("KoD DB %s empty.\n", db_file)); fclose(db_s); return; } diff --git a/sntp/main.c b/sntp/main.c index d17d41ab3..e69a42479 100644 --- a/sntp/main.c +++ b/sntp/main.c @@ -565,7 +565,7 @@ ntp_cb( rpktl = recvpkt(fd, &r_pkt, sizeof rbuf, (nctx->dctx->flags & CTX_UCST) ? &(nctx->x_pkt) : 0); - DPRINTF(2, ("ntp_cb: recvpkt returned %x/n", rpktl)); + DPRINTF(2, ("ntp_cb: recvpkt returned %x\n", rpktl)); /* If this is a Unicast packet, we're done ... */ if (nctx->dctx->flags & CTX_UCST) { @@ -677,7 +677,7 @@ handle_pkt ( break; case 1: - if (debug) { + if (debug > 2) { getnameinfo(host->ai_addr, host->ai_addrlen, addr_buf, sizeof(addr_buf), NULL, 0, NI_NUMERICHOST); printf("sntp handle_pkt: Received %i bytes from %s\n", @@ -756,7 +756,7 @@ offset_calculation ( NTOHL_FP(&rpkt->xmt, &p_xmt); *precision = LOGTOD(rpkt->precision); - DPRINTF(2, ("offset_calculation: precision: %f", *precision)); + DPRINTF(3, ("offset_calculation: precision: %f", *precision)); *root_dispersion = FPTOD(p_rdsp); @@ -794,7 +794,7 @@ offset_calculation ( *offset = (t21 + t34) / 2.; delta = t21 - t34; - DPRINTF(2, ("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n", t21, t34, delta, *offset)); + DPRINTF(3, ("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n", t21, t34, delta, *offset)); } diff --git a/sntp/networking.c b/sntp/networking.c index 15cea6763..a48405c9e 100644 --- a/sntp/networking.c +++ b/sntp/networking.c @@ -140,7 +140,7 @@ recvdata( return recvc; } #ifdef DEBUG - if (debug > 1) { + if (debug > 2) { printf("Received %d bytes from %s:\n", recvc, sptoa(sender)); pkt_output((struct pkt *)rdata, recvc, stdout); } @@ -446,7 +446,7 @@ unusable: * to our last request, but only if we're not in broadcast mode. */ #ifdef DEBUG - if (debug > 1) { + if (debug > 2) { printf("rpkt->org:\n"); l_fp_output(&rpkt->org, stdout); printf("spkt->xmt:\n");