On Mon, 13 Sep 2004 16:00:51 +0530 Karthikeyan wrote:
KN> We are in a situation to free some data only when the get next is executed
KN> for the last time( i.e., during the 20th time). For this scenario, how can
KN> we free that?

You can probably use the free_loop_context_at_end pointer to do that.

KN> also, currently, we are using data_free method which is
KN> called 20 times for the above scenario and noting down the count and once
KN> it touches the 20th time, we are freeing our data part? is there any other
KN> way apart from this?

I'm not sure what you are doing. Are you saying that you use the same data
structure for every data point? What happens when your table is called with
multiple varbinds for different data points? I think you need to allocate a new
data context every time.

KN> 2. our get first function will be called for 4 times if we have 4 rows in a
KN> table during run-time. But, we need to restrict some data to be executed
KN> only once inside get-first for every request from the manager. currently,
KN> we have blocked the calling of our code inside get first only once by
KN> putting some condition check. but, we are trying to find some other place
KN> to put our code so that we are calling some block of code to be exectued
KN> only once for every request. is this possible?

The other way to do that would be to inject another handler into the handler
chain. You could have this handler to execute that code before your iterator
handler.

-- 
Robert Story; NET-SNMP Junkie <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. 


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to