Re: xxx_Table_handler() not being called if table is empty.

Francois Bouchard <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAAZiaZd+TExoymm0JmOvOQKZ-UDUrVpa5UZgrop+N-yAfaoacA@mail.gmail.com>
> Which framework are you using to build the MIB code?
the script used is mib2c.table_data.conf, opt 1) cache data is held
externally.

But I want to reload the data using xxx_Table_load() only in the handler,
so disabled the following:


// cache = netsnmp_cache_create(MPBCRMHOSUTABLE_TIMEOUT,
                                  mpbcRMHOSUTable_load,
mpbcRMHOSUTable_free,
                                  mpbcRMHOSUTable_oid,
mpbcRMHOSUTable_oid_len);

//  netsnmp_inject_handler(..)

... and added a global pointer (static netsnmp_tdata * Gtable_data) that is
passed to xxx_Table_load().

Hope it's clear.


Francois




2012/3/28 Dave Shield <[email protected]>

> On 28 March 2012 14:49, Francois Bouchard <[email protected]>
> wrote:
> > If empty, the xxx_Table_handler() is not called upon 'get' request from
> the
> > browser.  Unless doing a preload of that table in initialize_table_xxx()
> > function, is there a way to trig the handler at any 'get request'.
>
> Which framework are you using to build the MIB code?
> Most of the table frameworks will have a routine xxx_Table_handler()
> but they work somewhat differently internally.   It's difficult to answer
> this sort of query without knowing the details of exactly what you've
> got at the moment.
>
> Dave
>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

_______________________________________________
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.