Merge commit 'rusty/ports-from-1.0.112' into foo
[garming/samba-autobuild/.git] / ctdb / server / ctdb_recover.c
index f61b6e7b6f63b1b11ec292c0e6b29ab172ff6b74..e1c7b16e988678ce3ae853c08dc66c62963c7065 100644 (file)
@@ -18,7 +18,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 #include "includes.h"
-#include "lib/events/events.h"
+#include "lib/tevent/tevent.h"
 #include "lib/tdb/include/tdb.h"
 #include "system/time.h"
 #include "system/network.h"
@@ -755,7 +755,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                                    ctdb_set_recmode_timeout, state);
 
        state->fde = event_add_fd(ctdb->ev, state, state->fd[0],
-                               EVENT_FD_READ|EVENT_FD_AUTOCLOSE,
+                               EVENT_FD_READ,
                                set_recmode_handler,
                                (void *)state);
 
@@ -763,6 +763,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                talloc_free(state);
                return -1;
        }
+       tevent_fd_set_auto_close(state->fde);
 
        state->ctdb    = ctdb;
        state->recmode = recmode;