ctdb->current_monitor = NULL;
}
- if (!from_user && (call == CTDB_EVENT_MONITOR || call == CTDB_EVENT_STATUS)) {
- ctdb->current_monitor = state;
- }
-
DEBUG(DEBUG_INFO,(__location__ " Starting eventscript %s %s\n",
ctdb_eventscript_call_names[state->call],
state->options));
/* Nothing to do? */
if (state->scripts->num_scripts == 0) {
ctdb->event_script_timeouts = 0;
+ talloc_free(state->scripts);
talloc_free(state);
return 0;
}
return -1;
}
+ if (!from_user && (call == CTDB_EVENT_MONITOR || call == CTDB_EVENT_STATUS)) {
+ ctdb->current_monitor = state;
+ }
+
talloc_set_destructor(state, event_script_destructor);
if (!timeval_is_zero(&state->timeout)) {
event_add_timed(ctdb->ev, state, timeval_current_ofs(state->timeout.tv_sec, state->timeout.tv_usec), ctdb_event_script_timeout, state);