AW: TRAPS + get requests

"Pedot, Wolfgang" <[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,
 
I would suggest to call agent_check_and_process with parameter "0" to
make it non-blocking and check your trap-conditions in the same loop.
Thats the way I do it.
 
regards
Wolfgang

________________________________

Von: [email protected]
[mailto:[email protected]] Im Auftrag von
Nikanth K
Gesendet: Freitag, 28. April 2006 13:11
An: [email protected];
[email protected]
Betreff: TRAPS + get requests


Hi
I am developing an agentx subagent on SUSE.
The problem is, I want to handle GET requests as well as TRAPS to be
sent by the same subagent.
But to handle get requests we need to loop on
       while(1)
        {
                agent_check_and_process(1); /* 0 == don't block */
        }
And I want to monitor and send traps as well.

If I use multi-threading(pthreads) to do this,i.e., one thread monitors
and sends traps and the other handles get-requests -  the subagent
crashes at some point of time. I heard multi-threading is not supported.

What is the best way to handle such situation?

Thanks & Regards
Nikanth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.