X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fntpd.c;h=ed3c04227ac086f46bbd8c9c0ef135577d15caf3;hb=aac3a531403cfb5f9bde9915c9559555225d335b;hp=39bbeeb5f5413cc7764f7273fc55d809d36e43e7;hpb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;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 */