On Tue, 15 Feb 2005 08:33:40 -0500 [EMAIL PROTECTED] wrote:
CRC>     session.peername = "localhost";
CRC>     session.community = "config";
CRC>     session.community_len = strlen(session.community);
CRC> 
CRC>     /* establish the session */
CRC>     ss = snmp_open(&session);
CRC> 
CRC>     snmp_log(LOG_INFO, "peername:%s\n", session.peername);
CRC>     snmp_log(LOG_INFO, "community:%s\n", session.community);
CRC> 
CRC> and the log output is:
CRC> 
CRC>    peername:localhost
CRC>    community:(null)
CRC> 
CRC> What the heck is _that_ about?

Excellent question. I don't see anything in the code that would clear the
memory in the input session. Is ss NULL? If not, what does it contain for
community?

Whenever something really weird like this happens, my first thought is
'mismatched libraries.' Check that

        ls /usr/lib/*snmp* /usr/local/lib/*snmp*

doesn't return multiple versions of the libraries. I'd also recommend building
a static version (configure --disable-shared --enable-static) for easier
debugging, and stepping into snmp_open and following it down the stack,
watching to see where the community gets cleared.

-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to