diff options
author | Martin Schwenke <martin@meltin.net> | 2015-03-18 20:27:45 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-05-10 03:22:14 +0200 |
commit | 070964dbcfd23e319eb8a5a9912ddd61ac99cf8c (patch) | |
tree | 6eee1567d9c82dae00b2c20de139c813e72df8f4 /ctdb | |
parent | 6808b0aa6a40e76e22070d8bde805f88a4bc899c (diff) | |
download | samba-070964dbcfd23e319eb8a5a9912ddd61ac99cf8c.tar.gz |
ctdb-daemon: Make ctdb_event_script_args() terminate if no scripts
status.done is never set to true unless event_script_callback() is
invoked. The short-circuit in ctdb_event_script_callback_v() means
that this doesn't happen. CTDB can't work very well without 00.ctdb
(for tunable initialisation and the like) but it shouldn't get stuck.
So call the callback when there are no scripts in
event_script_callback().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/eventscript.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 4dd437924f3..f976111f992 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -794,6 +794,7 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb, /* Nothing to do? */ if (state->scripts->num_scripts == 0) { + callback(ctdb, 0, private_data); talloc_free(state); return 0; } |