This is a multi-part message in MIME format.

------_=_NextPart_001_01C66AB5.CA393520
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,
=20
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.
=20
regards
Wolfgang

________________________________

Von: net-snmp-coders-admin@lists.sourceforge.net
[mailto:net-snmp-coders-admin@lists.sourceforge.net] Im Auftrag von
Nikanth K
Gesendet: Freitag, 28. April 2006 13:11
An: net-snmp-coders@lists.sourceforge.net;
net-snmp-users@lists.sourceforge.net
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 =3D=3D 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


------_=_NextPart_001_01C66AB5.CA393520
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable



charset=3Dus-ascii">


face=3DArial=20
color=3D#0000ff size=3D2>Hi,

face=3DArial=20
color=3D#0000ff size=3D2>
 

face=3DArial=20
color=3D#0000ff size=3D2>I would suggest to call agent_check_and_process =
with=20
parameter "0" to make it non-blocking and check your trap-conditions in =
the same=20
loop. Thats the way I do it.

face=3DArial=20
color=3D#0000ff size=3D2>
 

face=3DArial=20
color=3D#0000ff size=3D2>regards

face=3DArial=20
color=3D#0000ff size=3D2>Wolfgang





Von: =
net-snmp-coders-admin@lists.sourceforge.net=20
[mailto:net-snmp-coders-admin@lists.sourceforge.net] Im Auftrag von=20
Nikanth K
Gesendet: Freitag, 28. April 2006 =
13:11
An:=20
net-snmp-coders@lists.sourceforge.net;=20
net-snmp-users@lists.sourceforge.net
Betreff: TRAPS + get=20
requests


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

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

What is the best way to handle such =
situation?

Thanks=20
& Regards
Nikanth


------_=_NextPart_001_01C66AB5.CA393520--


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders