[rrd-developers] [PATCH] Use the same IPv6/IPv4 as for the client as Florian did for the server

Florian Forster rrdtool at nospam.verplant.org
Thu Sep 25 23:18:08 CEST 2008


Hi Kevin,

On Thu, Sep 25, 2008 at 08:44:38PM +0000, kevin brintnall wrote:
>  src/rrd_client.c |   47 ++++++++++++++++++++++++++++++++++++++++++-----

oh, I must have missed that, thanks for fixing it :)

> -static int rrdc_connect_network (const char *addr) /* {{{ */
> +static int rrdc_connect_network (const char *addr_orig) /* {{{ */
>  {
> +  char addr_copy[NI_MAXHOST];
> +  char *addr;

Forgot to mention this before: I'm copying the address here, because
later we do something like
  port = strchr (addr, ':');
  if (port != NULL)
    *port = 0;
So we will write into the buffer pointed to by `addr' although it is a
`const char *' - that's not nice.. Hence the copy ;)

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://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080925/274b213e/attachment.bin 


More information about the rrd-developers mailing list