ctdb-daemon: Return early when refusing to run an event script
authorMartin Schwenke <martin@meltin.net>
Wed, 10 Oct 2018 02:35:00 +0000 (13:35 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 22 Oct 2018 04:04:20 +0000 (06:04 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659

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

index 267f38a075ffa59ed9956fef224c0417e88113b5..31f267c5c8e81091622c5b347f685f7b4e6e960c 100644 (file)
@@ -616,6 +616,7 @@ int ctdb_event_script_run(struct ctdb_context *ctdb,
                DEBUG(DEBUG_ERR,
                      ("Refusing to run event '%s' while in recovery\n",
                       ctdb_eventscript_call_names[event]));
+               return -1;
        }
 
        state = talloc_zero(mem_ctx, struct ctdb_event_script_run_state);