[AGENT++] problem with notify_register() and response through callback function
Jochen Katz
katz at agentpp.com
Fri Oct 8 23:33:09 CEST 2004
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