atexit(write_kod_db);
- DPRINTF(2, ("Initializing KOD DB..."));
+ DPRINTF(2, ("Initializing KOD DB...\n"));
kod_db_file = estrdup(db_file);
}
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;
}
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) {
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",
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);
*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));
}
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);
}
* 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");