[SNMP4J] Bug in snmp4j-1.9.3 on PendingRequest.run()
Frank Fock
fock at agentpp.com
Tue Jul 22 21:34:35 CEST 2008
Hi Iker,
Thanks for reporting this one. It is a special
case that I have overseen and which was not covered
by our tests.
I have updated SNMP4J, -Agent, and -AgentX on
the web site accordingly, although for the Agent(X)
version this bug should not make any difference.
Best regards,
Frank
Iker Almandoz wrote:
> Hi Frank,
>
> Thanks a lot for doing the efficiency updates and doing the 1.9.3 release.
>
> I started using the new version immediately and came across the following:
>
> In the PendingRequest.run() method, you have added
>
> if ((m_key == null) || (m_pdu == null) || (m_target == null) ||
> (m_transport == null) || (m_listener == null)) {
> if (logger.isDebugEnabled()) {
> logger.debug("PendingRequest canceled key="+m_key+", pdu="+m_pdu+
> ", target="+m_target+", transport="+m_transport+", listener="+
> m_listener);
> }
> return;
> }
>
>
> However, when I use:
>
> public ResponseEvent send(PDU pdu, Target target) throws IOException {
> return send(pdu, target, null);
> }
>
> Which calls
>
> public ResponseEvent send(PDU pdu, Target target,
> TransportMapping transport) throws IOException {
> if (!pdu.isConfirmedPdu()) {
> sendMessage(pdu, target, transport, null);
> return null;
> }
> if (timer == null) {
> createPendingTimer();
> }
> SyncResponseListener syncResponse = new SyncResponseListener();
> PendingRequest retryRequest = null;
> synchronized (syncResponse) {
> PduHandle handle = null;
> PendingRequest request =
> new PendingRequest(syncResponse, target, pdu, target, transport);
>
>
> Then the PEndingRequest is initialized with m_transport = null
>
> This is somehow creating a problem in my code making it hang when I try a
> request that fails,
>
> Best regards,
> Iker
>
> _______________________________________________
> 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