[SNMP4J] A bug or not ??

Frank Fock fock at agentpp.com
Fri Nov 11 08:48:42 CET 2005


Hi Yielruse,

Yes, it is a bug - a regression in v1.6. You can add
the following line just before the return statement in
Snmp.send(PDU,Target,TransportMapping) to fix it:

// We are finished so cancel the request
cancel(pdu, syncResponse); // <---- new
return syncResponse.response;
}

A new update release will be available soon.

Best regards,
Frank

yielruse wrote:

>Hi, 
>    I used "org.snmp4j.Snmp.send(PDU, Target)" to get a device's sysName(with retries=2, and snmp_timeout=3000ms). The operation succeeded at the first request but it has sent the same PDU (with the same RequestID) three times and the interval was 3000ms. It should just send one request PDU not three.
>    
>    In my opinion that is a bug, but I want to confirm it.
>    
>    Why this happened ? 
>    It's all because that the inner class "SyncResponseListener" of the class "Snmp" does not invoke "Snmp.cancle(..)" when it receives the first response PDU.
>    And I think it will make a memery leak when the program invokes the "send(PDU, Target)" many many times
>    
>    Am I right?
>    
>Regards.
>Yielruse
>
>------------------------------------------------------------------------
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>  
>


-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com





More information about the SNMP4J mailing list