> Make sense?

I think so.  Let me restate what I think I know. 

If I use the command line "snmpset" to set a bunch of variables, I am (nearly*) 
guaranteed that either they all happen or none of them do.

So if I set foo to 3 and bar to 7, handle_foo() will get a RESERVE1, RESERVE2, 
etc.  handle_bar will get a RESERVE1, RESERVE2, etc.  If neither returns any 
error, net-snmp assumes that all will work and calls handle_foo() with a COMMIT 
and calls handle_bar() with COMMIT.  If there is a problem, the UNDO and FREE 
(or FREE and UNDO) are called and no COMMITs are called.

Which means if two different snmpset's are done, one will get in first and 
either backout or succeed before the second gets a chance to happen.  Correct?  
If so, then I conclude I am safe.

You pointed out the case of two different sets of the same variable in a single 
snmpset might interfere.  Well, that is perverse and I think not a case I need 
to handle "correctly" (because it is poorly defined what would be correct), but 
merely not crash or corrupt.

Right?

Thanks,

-kb, the Kent who thinks he will add a check that he is not reentered and if he 
is, error out in the RESERVE1 stage to kill the whole transaction.


* "nearly"? Well, if I error in the COMMIT, what can net-snmp do? If I (and 
every other handler) never errors out of the COMMIT, then the guarantee can be 
met.

--
Kent Borg
Software Engineer
CSR Technology, Inc.
A member of the CSR Group of Companies
+1-781-791-6282
kent.b...@csr.com


Member of the CSR plc group of companies. CSR plc registered in England and 
Wales, registered number 4187346, registered office Churchill House, Cambridge 
Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at 
http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to