On 04/28/2010 02:57 PM, Stephen Gallagher wrote:
Simo made some excellent suggestions on IRC, so I have incorporated
them:
First, I changed the interface for be_add_online_cb() so that it will
now take a mem_ctx and pass back (if requested) the online_cb object.
(This object is now opaque). This way, the callback will be
automatically freed if the parent context goes away for any reason.
I removed the be_remove_online_cb() function, so the interface to remove
a callback will simply be to call talloc_free() on the opaque object
returned from be_add_online_cb. This will allow us to potentially set
the same callback function multiple times, with different private data.
New patch attached.
Fix some style issues with the previous patch.
--
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/