[AGENT++] Consts in SNMP++

Jochen Katz katz at agentpp.com
Fri Feb 13 22:55:36 CET 2004


Hi all,

>>If you're only worried about the friendly_name method, I would suggest
>>calling it once after creation of an address object. Or I could change any
>>iv_friendly_name[0] = 0 to memset(iv_friendly_name,...).
> 
> Yes, indeed, calling it immediately would help. However... what happens if
> DNS is not working correctly? You may end up with a long delay on Address
> creation (which may be not desirable) or, even worse, a repeated call to
> friendly_name() could repeat the discrovery - and the problem returns.

It's like you wrote: If DNS lookups run into timeout friendly_name() 
hangs. friendly_name() must not remember the failed lookup, and so 
repeated calls will also try a DNS lookup.

The address classes will now clear the full friendly name buffer using 
memset.

Regards,
   Jochen



More information about the AGENTPP mailing list