Hi,

I've discovered that on some of our systems (perhaps only half a dozen out
of 500 or so) gmond crashes if the "override_ip" configuration option is
set. I've worked out that the problem is something to do with this block of
code...

#if 1
                char* tmpstr = malloc( strlen(( override_ip != NULL ?
override_ip : override_hostname )) + strlen( override_hostname ) + 1 );
                strcpy (tmpstr, (char *)( override_ip != NULL ? override_ip
: override_hostname ) );
                strcat (tmpstr, ":");
                strcat (tmpstr, (char *) override_hostname);

                cb->msg.Ganglia_value_msg_u.gstr.metric_id.host = tmpstr;
#endif
#if 0
                cb->msg.Ganglia_value_msg_u.gstr.metric_id.host =
apr_pstrcat(gm_pool, (char *)( override_ip != NULL ? override_ip :
override_hostname ), ":", (char *) override_hostname, NULL);
#endif

What I'm trying to understand at the moment is why the "apr_pstrcat"
version is "#if 0" commented out when it seems to work OK during my testing.

Thanks,
Nick
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to