[AGENT++] The trap is received but callback isn't executed?
Jochen Katz
katz at agentpp.com
Thu Aug 3 20:37:23 CEST 2006
Hi,
> I'm currently learning to work with traps and informs. I have defined
> callback function and registered it in Snmp object. I have set oids (well
> just one)target and target listen address, and started poll thread. Agent is
> normally sending traps with
>
> Logging mechanism informs me that trap generated by agent is received, and
> parsed, but callback function that I registered isn't initiated. How come?
please try to register for traps/infrms with empty Oid- and
TargetCollections.
Depending on the passed Collections CNotifyEvent::notify_filter() will
return false and the received trap is ignored.
> And I have one more question about start_poll_thread(). Can it be started
> multiple times?
No, it will be startet just once.
> Because it seems that I can start it many times and the
> return value is always true.
This is desired behaviour: If the thread is running, the start function
returns true, as it is (still) running.
Regards,
Jochen
More information about the AGENTPP
mailing list