Re: cache problems with table data mib2c

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 14 June 2010 20:25, Kathy McLeod <[email protected]> wrote:
> (See attached file: lldpPortConfigTable.C)

Unfortunately, this file did not actually compile.
(it complained about line 210
   entry = SNMP_MALLOC_TYPEDEF(lldpPortConfigTable_entry);
       which should presumable be "struct lldpPortConfigTable_entry"
)
This is slightly worrying, since it implies you are working with
a different code file than the version you supplied.


> Summary of problems is 1) load is only called for an snmpget, not for other
> commands; 2) the first get after the load always fails, and then when I
> repeat the command, it works (I am testing using a command line interface);

Hmmm...   this sounds as if the cache load routine is being called *after*
the decisions about which row of the table to process, rather than before.

Try tweaking the injection of the cache handler to use 'TABLE_HANDLER_NAME'
rather than 'TABLE_TDATA_NAME'.   That seems to trigger the cache load
at a slightly earlier point, so that it's available both for the first
GET request,
and also for GETNEXT (and similar) requests.


Dave

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.