> 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. 

Yeah, I'm full of 'em. ;-)

> 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?

I'll look.

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

Yeah, we've had that discussion before.  I was pretty careful to scrub by 
development and test systems for 5.1 libraries before I did this.  I did `make 
-n` and looked at all the directories listed for -L options.  I've done 
ldconfig.

> Check that
> 
>       ls /usr/lib/*snmp* /usr/local/lib/*snmp*
> 
> doesn't return multiple versions of the libraries. 

Nothing in /usr/local/lib, all 5.2.1 in /usr/lib.

> I'd also 
> recommend building
> a static version (configure --disable-shared --enable-static) for 
> easierdebugging, and stepping into snmp_open and following it down 
> the stack,
> watching to see where the community gets cleared.

OK.  I'll try that now.  Thanks.



-------------------------------------------------------
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