>>>>> On Wed, 01 Sep 2010 08:00:44 +0200, Magnus Fromreide
>>>>> <[email protected]> said:
MF> if ((rc = netsnmp_sess_config_transport(in_session->transport_configuration,
MF> transport)) != SNMPERR_SUCCESS) {
MF> return rc;
in_session-> s_snmp_errno = rc;
in_session-> s_errno = 0;
MF> return rc;
MF> }
Whoops; good catch. It should be the second so the tools print the
right error message when an error is encountered.
The obvious patch is:
diff --git a/net-snmp/snmplib/snmp_api.c b/net-snmp/snmplib/snmp_api.c
index 9c7990f..3cb6edc 100644
--- a/net-snmp/snmplib/snmp_api.c
+++ b/net-snmp/snmplib/snmp_api.c
@@ -1520,7 +1520,6 @@ netsnmp_sess_config_and_open_transport(netsnmp_session
*in_session,
if ((rc =
netsnmp_sess_config_transport(in_session->transport_configuration,
transport)) != SNMPERR_SUCCESS) {
- return rc;
in_session->s_snmp_errno = rc;
in_session->s_errno = 0;
return rc;
--
Wes Hardaker
Please mail all replies to [email protected]
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders