[SNMP4J] Processing agentx-Notify-PDU in AgentXMasterAgent

Frank Fock fock at agentpp.com
Fri Mar 16 00:38:58 CET 2007


Hi Peter,

Thanks for the fix. I have included it into the next update
release 1.0a.

Best regards,
Frank


Peder Toftegaard Olsen wrote:
> Hi,
> 
> AgentXMasterAgent returns an error when sending notifications. The error
> code is 268 (processingError) and the error index is 2. I tracked it down to
> AgentXCommandProcessor.notify(...). The validation of the first two variable
> bindings is incorrect.
> 
> This is the original code:
> 
>   if ((vbs.length < 2) ||
>       (SnmpConstants.snmpTrapOID.equals(vbs[1].getOid()))) {
>     response.setErrorStatus(AgentXProtocol.AGENTX_PROCESSING_ERROR);
>     response.setErrorIndex(2);
>   }
> 
> It should be:
> 
>   if ((vbs.length < 2) ||
>       (!SnmpConstants.snmpTrapOID.equals(vbs[1].getOid()))) {
>     response.setErrorStatus(AgentXProtocol.AGENTX_PROCESSING_ERROR);
>     response.setErrorIndex(2);
>   }
> 
> 
> 
> Best regards
> 
> Peder Toftegaard Olsen
> Senior Software Architect, Mobilethink A/S
> 
> 
> _______________________________________________
> 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