What kind of problems? Could you please elaborate or point to? I could receive messages and send traps from the new thread. I don't share data in my code. Probably the send_easy_traps or other Trap APIs might share data. I haven't looked in detail yet as I didn't notice any 'major' problems.
I call the pthread_create, in the receive function in snmpd.c, but before it gets in to the for..loop..while running==1. The strange thing is that I see 2 threads instead of 1 thread, after I introduce the pthread_create..Couldn't figure out why yet? This is minor problem as I have seen one of the thread being NOT used. --- Robert Story <[EMAIL PROTECTED]> wrote: > On Tue, 14 Jun 2005 17:47:41 -0700 (PDT) Surya > wrote: > SP> I fork a thread from snmpd.c and in that thread > I > SP> listen on a message queue and thus generate > SP> traps..Sound OK?? > > actually, no. using the snmp library in different > threads is very likely to > cause problems. what you should do is keep a pipe to > the main snmpd thread, and > when you get something on the message queue, send > the info to the main thread > and let it send the trap... > > -- > NOTE: messages sent directly to me, instead of the > lists, will be deleted > unless they are requests for paid consulting > services. > > Robert Story; NET-SNMP Junkie > Support: <http://www.net-snmp.org/> > <irc://irc.freenode.net/#net-snmp> > Archive: > <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> > > You are lost in a twisty maze of little standards, > all different. > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > from IBM. Find simple to follow Roadmaps, > straightforward articles, > informative Webcasts and more! Get everything you > need to get up to > speed, fast. > http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Net-snmp-coders mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > __________________________________ Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
