From: <no...@so...> - 2002-03-29 07:04:02
|
Bugs item #536386, was opened at 2002-03-28 10:20 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112694&aid=536386&group_id=12694 Category: library Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Wes Hardaker (hardaker) Summary: _init_snmp() may not execute Initial Comment: The _init_snmp() call in snmp_api.c tests the Reqid value in order to avoid executing twice. This creates an unnecessary hazard, because calling snmp_pdu_create will increment Reqid, causing _init_snmp() not to run in a subsequent call to snmp_open(). A better method would be to use a static local 'done_init' variable, as is done in the init_snmp() call, since this would guarantee that the init code would run at least once. It would then be possible to check the Reqid variable and generate a debug or log message if it was found to be nonzero. This would warn the user that they were using the API without proper initialization. ---------------------------------------------------------------------- Comment By: Wes Hardaker (hardaker) Date: 2002-03-28 23:03 Message: Logged In: YES user_id=76242 Fixed in the next release. I didn't implement a reqid check, however. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112694&aid=536386&group_id=12694 |