]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
debug level cleanup
authorHarlan Stenn <stenn@ntp.org>
Mon, 10 Jan 2011 23:45:26 +0000 (23:45 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 10 Jan 2011 23:45:26 +0000 (23:45 +0000)
bk: 4d2b9a16DL9_K9D_am83s-pPMjcSLg

sntp/main.c
sntp/networking.c

index 517e465b8a353eef698b8afab79df8e6f352554a..058621fc714fccd8c4e4d8593d813016fd0f5072 100644 (file)
@@ -485,7 +485,7 @@ ntp_cb(
        int rpktl;
        int rc;
 
-       if (debug)
+       if (debug > 1)
            printf("ntp_cb: event on socket %d:%s%s%s%s [%s%s] <%s>\n",
                (int) fd,
                (what & EV_TIMEOUT) ? " timeout" : "",
@@ -501,7 +501,7 @@ ntp_cb(
        rpktl = recvpkt(fd, &r_pkt, sizeof rbuf,
                (nctx->dctx->flags & CTX_UCST) ? &(nctx->x_pkt) :  0);
 
-       DPRINTF(1, ("ntp_cb: recvpkt returned %x", 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) {
@@ -730,9 +730,7 @@ offset_calculation (
        *offset = (t21 + t34) / 2.;
        delta = t21 - t34;
 
-       if (debug)
-               printf("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n",
-                          t21, t34, delta, *offset);
+       DPRINTF(2, ("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n", t21, t34, delta, *offset));
 }
 
 
index f58b0633f9a1817c915406f34d5c5067df31923d..15cea676329320f33e3beeada4fde94c2a608cc8 100644 (file)
@@ -115,10 +115,7 @@ sendpkt (
                        /* oh well */
                }
        } else {
-#ifdef DEBUG
-               if (debug)
-                       printf("Packet sent.\n");
-#endif
+               DPRINTF(3, ("Packet sent.\n"));
        }
 }