On 02/10/06, vinh <[EMAIL PROTECTED]> wrote: > Hi, I'm using a subagent and I'm trying to delete a table with old > data and then remake it again with new data, since the number of rows > are going to be dynamic. So I'm wondering what is the proper way to > do this. As I'm doing it now I'm first deleting all the rows through > <tablename>_removeEntry(...) then doing a > "netsnmp_tdata_delete_table(tableptr); "
It shouldn't be necessary to delete the rows individually, since delete_table will do this automatically. But if you're going to immediately re-create the table again, then what's the point of deleting it? Why not simply call removeEntry repeatedly to clear the contents of the table, and then start re-populating the same table structure? This is basically the code that's generated if you invoke mib2c with -Scache=1 > While this seems to work, I'm currently getting a small memory leak > and the index for my first row is not correct as it will change from 1 > --> 0 --> 65326, and some other random numbers. I looks like > something is overwriting my values for the index. Can you tell what I > could be doing wrong? How are you specifying the indexes to use? What does this code look like? Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
