[collectd] ntpd plugin complaining [FIXED finally]

Florian Forster octo at verplant.org
Sat Nov 4 13:27:00 CET 2006


Hi Lubos,

thank you very much for being so persistent and resolving this issue :)

On Fri, Nov 03, 2006 at 10:39:55PM +0100, Lubo?? Stan??k wrote:
> This part of the code should run only once in the polling loop.
> 
> if (items_num == 0) /* first packet */
> {
> 	DBG ("*res_size = %i", pkt_item_len);
> 	*res_size = pkt_item_len;
> }
> 
> I have repaired it this way (the last line is appended):
> 
>  items = realloc ((void *) *res_data,
>       (items_num + pkt_item_num) * res_item_size);
> +items_num = items_num + pkt_item_num;

this is of course a nasty bug :/ I've fixed it in commit `98a4d6de'
which you can pull from the repository. I'll pack a new version later
today.

> I would recommend enlarging the peername[512] to peername[NI_MAXHOST]
> therefore.

Agreed. I've fixed this as well.

Thanks again for the effort you've put into this :)
Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061104/31379e11/attachment.pgp


More information about the collectd mailing list