Hi I tried to compile the module as a separate agentx subagent (which it should be in the final application) and my problem disappeared and i works fine now. :)
I have another question: I'd like to control when the cache is flushed. If I set the following cache flags the cache will never be flushed, right? NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD NETSNMP_CACHE_DONT_FREE_EXPIRED NETSNMP_CACHE_DONT_AUTO_RELEASE But how do I flush the cache manually? The reason for this is that in my application the table data should only be fetched (from an external source) when there's new data available. My idea is to check a flag in my _cache_load routine and only if new data is availble the table data should be loaded else the old data present in the table should be used. But before I can load new data into the table I need to flush the old data. Thanks, Jon Neerup Lassen On 7/15/05, Robert Story <[EMAIL PROTECTED]> wrote: > On Tue, 5 Jul 2005 12:51:12 +0200 Jon wrote: > JNL> I'm trying to extend the agent with my own MIB using mib2c and the MIB > JNL> For Dummies framework. > JNL> > JNL> The agent works fine and I can do a snmpwalk on the table, but when > JNL> the container-cache reloads snmpwalk gives an empty result (no error). > > Have you run with debugging? (-Dverbose:fft,fft)? Any debug messages from the > cache load routine? > > JNL> int > JNL> fftHoldTable_cache_load(netsnmp_container * container) > JNL> { > JNL> ... > JNL> /* > JNL> * Fetch fft_data from external data source (fpga) using ip/udp > JNL> */ > JNL> if(get_fft_hold(fft_data) == -1) > JNL> return MFD_RESOURCE_UNAVAILABLE; > > I'd add a snmp_log(LOG_ERR,"..."), or at least a debug message here.. > > JNL> for(count=0;count<FFT_SIZE;count++) { > JNL> > JNL> binNumber = count; > JNL> ... > JNL> if (MFD_SUCCESS != fftHoldTable_indexes_set(rowreq_ctx, > binNumber)) { > > You know that index numbers aren't supposed to change, right? If fft_data > isn't > ALWAYS FFT_SIZE entries, this code isn't right. > > JNL> DEBUGMSGT(("verbose:fftHoldTable:fftHoldTable_cache_load", > JNL> "inserted %d records\n", count)); > > How many records does the debug message indicate were inserted? > > -- > 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_idt77&alloc_id492&op=click _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders