On Thu, 25 Nov 2004 08:20:03 +0100 P wrote:
PK> > PK> 2) I got some sigsev's after deleting table row. I've changed
PK> > 
PK> > How are you deleting the table row?
PK> 
PK> in _commit function I call some system functions to remove data from
PK> system (in this case I call system("isdnctrl blah blah blah") to
PK> remove isdn interface). I don't touch cache or so, but I had turned
PK> OFF ,,dont updata caceh on set'' option (flag in _interface.c file).

Ah, well that's exactly the problem. That will cause the cache to be released
*before* the commit is called, so the data context will no longer be valid. You
really shouldn't muck around in the interface.c file. If you think you need
changes there, let me know, and we can see if there is another way to do
what you want, or add a safe interface to do what you want.

In this particular case, what you want to do is to set a flag to let the
interface code know that you have removed a row:

        rowreq_ctx->rowreq_flags |= MFD_ROW_DELETED;

You would also want to clear that flag in the undo_commit code, where you call
system to restore the interface.

PK> > I'd really like to see a stack trace for the crash without this fix...
PK> 
PK> Right. But it's embdeded system based on power-pc and there is no
PK> ,,dmalloc out of the box''. Maybe I will build one....

No worries, the cache invalidation is the problem...

PK> > Hmm... I'll have to think about it, but that sounds like a good idea...
PK> :) And one more: add column_skip_flag to rowreq_ctx. Cache_load can
PK> set some bits to '1' that mean that there is no values in some column.
PK> Then _get can return MFD_SKIP for that column.

Hmmm... well, if the column will never have data (eg is isn't implemented),
then you can specify valid_columns during registration, and it will be skipped
way up at the table or table_container level.

-- 
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 email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to