X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fntpd.c;h=ed3c04227ac086f46bbd8c9c0ef135577d15caf3;hb=5a32acd88719481cc22aaecd36f3cbc11f3a3489;hp=39bbeeb5f5413cc7764f7273fc55d809d36e43e7;hpb=072244d2e10336241610a1a0448a8149e9c77e7e;p=collectd.git diff --git a/src/ntpd.c b/src/ntpd.c index 39bbeeb5..ed3c0422 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -584,7 +584,7 @@ static int ntpd_receive_response(int *res_items, int *res_size, char **res_data, * Enough with the checks. Copy the data now. * We start by allocating some more memory. */ - DEBUG("realloc (%p, %zu)", (void *)*res_data, + DEBUG("realloc (%p, %" PRIsz ")", (void *)*res_data, (items_num + pkt_item_num) * res_item_size); items = realloc(*res_data, (items_num + pkt_item_num) * res_item_size); if (items == NULL) { @@ -883,6 +883,12 @@ static int ntpd_read(void) { continue; } + // `0.0.0.0` hosts are caused by POOL servers + // see https://github.com/collectd/collectd/issues/2358 + if (strcmp(peername, "0.0.0.0") == 0) { + continue; + } + refclock_id = ntpd_get_refclock_id(ptr); /* Convert the `long floating point' offset value to double */