On Mon, 22 Feb 2010 23:02:54 +0100 Gerlando wrote:
GF> Or are you suggesting I don't even create a new container type (and use 
GF> the standard container to keep just the indexes of the existing rows, 
GF> and then use that information in my own handler (i.e, the one is passed 
GF> to netsnmp_create_handler_registration())?

Yes, I think that's what he means.

GF> In that case, how would I handle locking anyway? I don't see any 
GF> suitable injection point...

That's a tricky one... especially if you have multiple tables, since a single
request could have varbinds for different tables... I think you probably want
to have each handler check for something that you put in the agent list for
the reqinfo structure (see netsnmp_agent_get_list_data() and friends), and if
it doesn't exist, set the lock and add it. The think that you add should have
a custom free_func function (see data_list.h), which should release the lock.
The delete function should only be called once the request is finished
processing, no matter how many tables are in the request.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to