On Thu, 2007-06-28 at 10:31 -0600, Levi Pearson wrote: > On Thu, 2007-06-28 at 09:19 -0700, Al Chu wrote: > > > I really view the engine and the contexts as two separate "objects" the > > user is responsible for. The user "creates" each context and thus is > > responsible for "destroying" each one. The user "inits" the engine and > > responsible for "destroying" it as well. (Perhaps the function names > > aren't clear? Should be "init" and "cleanup"?? "bringup" and > > "teardown"??) > > > > But I can see how you (and others) might have been confused, thinking > > after you "submit" a context to the engine, the engine is responsible > > for destroying it. Was this the confusion? > > > > I should definitely make this more clear if it was confusing. > > No, this isn't confusing at all. I only started wondering if the engine > teardown might destroy the contexts as well when I started looking > through the code and headers and saw that it was supposedly blocking > until the sessions stopped.
Ok. I think I will add a few more comments/info to the header file anyways so others might know. > > > > > > > This is fine--I can call ipmi_ctx_destroy() on them afterwards--but if I > > > > call ipmiconsole_engine_teardown() I have no way of knowing when the > > > > contexts have all closed their sessions so that I know it's safe to > > > > start cleaning them all up so I don't get failures due to active > > > > sessions. > > > > If you are witnessing that IPMI sessions are not closed after after > > ipmiconsole_engine_teardown()? Or just that the ipmi contexts are not > > destroyed? The later is ok, the former is not ok. Looking at the code > > again, the logic I put in there indicates that the engine_teardown > > should not return until each ipmi session closes or times out. > > I was calling ipmiconsole_engine_teardown(), which I was assuming would > block until the sessions all closed. So is it not closing the sessions? > It would be handy to have a call that > does trigger the closing of all sessions such that ipmi_ctx_destroy() > will work on them afterward, though. The library should work such that if you do: engine_teardown(); foreach context I created ipmi_destroy_ctx(ctx); This should work. I'll look into this. Al > > --Levi -- Albert Chu [EMAIL PROTECTED] 925-422-5311 Computer Scientist High Performance Systems Division Lawrence Livermore National Laboratory _______________________________________________ Freeipmi-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/freeipmi-devel
