ctdb-recovery: Factor out new function set_recmode_handler()
authorMartin Schwenke <martin@meltin.net>
Mon, 11 Jan 2016 05:35:35 +0000 (16:35 +1100)
committerAmitay Isaacs <amitay@samba.org>
Thu, 28 Apr 2016 07:39:16 +0000 (09:39 +0200)
commit419f57f3786dc34de769e1c30f4979f9f3b5906e
tree73bd13aa8658be754e51940fe38c679d937832d0
parent14a2330692a4d2e0058e72f9ea8b1c61ed920344
ctdb-recovery: Factor out new function set_recmode_handler()

This is used to reply to the recmode control for all the different
cases.  The callers can later be generalised to use a pointer, which
can then be used for recovery lock handling in different contexts.

Note that the handle is now freed in set_recmode_handler() rather than
the callbacks.

There is one difference in behaviour.  Deferred attach calls are now
processed in the timeout case, where they weren't before.  That's a
bug fix!

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recover.c