]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cleanup
authorHarlan Stenn <stenn@ntp.org>
Tue, 11 Jan 2011 05:34:29 +0000 (05:34 +0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 11 Jan 2011 05:34:29 +0000 (05:34 +0000)
bk: 4d2bebe5aVXn4q4Sq5L81S2oy9vDzg

sntp/kod_management.c
sntp/main.c
sntp/networking.c

index c0d9f21747fa40e616fb9bbbd2700782b4f379aa..d98204e401b0f98f7fd0d64c9de374ef7c4ba887 100644 (file)
@@ -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;
        }
index d17d41ab3091fb469a09564089d9f8a58a5d1452..e69a42479703c8c4ed036bdd391ee84818e16c2f 100644 (file)
@@ -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));
 }
 
 
index 15cea676329320f33e3beeada4fde94c2a608cc8..a48405c9ea3456a94412f020e83a73b50877cbdf 100644 (file)
@@ -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");