[AGENT++] problem with notify_register() and response through callback function
Martijn Spaan
mspa at oce.nl
Mon Oct 11 10:36:25 CEST 2004
Jochen,
Thanks for your reply. I've followed your advice to empty the
oid-/target collections and it works. I can now receive all my traps
perfectly.
Thanks,
Martijn
Jochen Katz wrote:
> Hi Martijn,
>
>> I am trying to receive traps from a printer device, but something
>> goes wrong. I use notify_register() to register the traps I want to
>> subscribe to. I also see (with a sniffer) that the traps are received
>> by my computer successfully but they are not redirected to my
>> callback function I have specified when calling notify_register().
>
>
> did you try with empty Oid-/Targetcollections?
>
>> When debugging I see that in the receive_snmp_response(), GetEntry()
>> is called with a specified notify_id. This id contains 0 and the
>> GetEntry() returns NULL because absolutely no entries are registered.
>
>
> receive_snmp_response() should not be invloved for trap receiption.
> Instead receive_snmp_notification() should be called from
> CNotifyEventQueue::HandleEvents().
>
>> What goes wrong, and what can I do about it. If you need more
>> information I will gladly provide it.
>
>
> You can compile snmp++ with _DEBUG defined and try to receive the trap
> with the receive_trap example.
>
> Regards,
> Jochen
>
>
More information about the AGENTPP
mailing list