Hello,
I've been reading mails about
using threads in the agent, and it seems multi-thread not supported whitout
the agent.
I've tryed it and raising a
trap (calling sen_v2trap) from the main thread in my subagent works OK but
nothing is received if a sent it from a different thread.
The reason why I need to use a
different threads is the condition to send traps. My application must be waiting
to receive window events to send traps.
I've implemented a solution but
I would like to know your opinion about it because I don't know if it's too
good, it works! but may be you know a better way to do it or you can give me any
advice to forewarn problems.
I've extended the master agent
to initialize the mib code, create tables and receive
snmpwalk queries and it works properly
and also I've implemented a
window application subagent to listen to window events and send traps from the
main thread. Writting the subagent in a windows application it isn't the
better way to work, but I have no choice
because the subagent needs to receive window events.
I supponse using both agents
master an subagent it's like having two different threads so if I start them I
can wait for GET queries from the master agent while listening to window
events and sending traps from the subagent. Is that a good
idea?
Thanks a lot to anyone who can
help me,
Estefanía
|
- Multi-thread trouble EstefanÃa Guerrero
- Re: Multi-thread trouble Robert Story