Hello, I read NET_SNMP is single threaded and does not claim to be thread safe either. Now I have requirement to periodically fetch all the alarms related data from DB and update the NETSNMP CONTAINER from which GET/GET NEXT/GET BULK request will return data.
I have implemented this in following way. I created a new thread and make that thread sleep for some time and after it resumes it fetches the data from DB (this happens continously in while(1)). Now in this thread only,i updated the NetSNMP CONTAINER using CONTAINER.INSERT() and took a mutex before updating it. But the cacth here is while updation is going on and mutex lock is there and some GET/GET NEXT/GET BULK request comes so it won't be able to access CONTAINER and will timeout/ error will be thrown. So how to handle this. Is my approach right Thanks ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
