Uxsnmp::get() with callbacks does not send retry messages

Hello,
I have some troubles about the retries that are actually not sent.

I use the uxsnmp::get function with callbacks, which is basically doing :

pdu.set_type( sNMP_PDU_GET_ASYNC);

and then calls uxsnmp::snmp_engine().

The message is sent, no issue.
When comming back in snmp_engine, called by the retry code, it is coming with the callback variables initialized correctly, but the type of the pdu is not sNMP_PDU_GET_ASYNC anymore, but sNMP_PDU_GET.

There is a test stating that if the type is sNMP_PDU_GET, there should be no callback.
Of course in my case the test fails and snmp_engine returns with the SNMP_CLASS_INVALID_CALLBACK code.

So the retry messages are not sent.

If I comment the test, the retry messages are sent correctly.

Looks like the type is changed in snmp_engine by the methods map_action() for a reason I do not get.

Is anyone having the same trouble?
Did I miss someting when calling get() or in some SNMP initialization?

I use snmp++ 3.5.0.0

Note that with version 3.3.13, it was working

Thanks a lot,
Stéphane.

Hi,

this bug was introduced with version 3.5.0. Before this version, the previously saved serialised message was sent out. Since version 3.5.0 the message queue calls snmp_engine() to produce a new serialised message with a new SNMPv3 message id.

If only the test in snmp_engine() is removed, it will handle the retry as a synchronous request and will block for a response, so the fix is to “unmap” the pdu type in CSNMPMessage::ResendMessage() if a callback is available. A fixed version will be released soon.

Thanks for your report and best regards,
Jochen

Hello Jochen,
Thank you very much for your answer.
I’ll wait for the fix.
Stéphane.