diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2011-04-12 05:24:43 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2011-04-12 06:36:42 +1000 |
commit | 2f1395ce03cea0bc7fb7ce8512df0ff82d09b2ef (patch) | |
tree | 34ac98732d23421132e50ff9f065b768951cf8fc | |
parent | c04505724a068ab42fd43aa949d2852607fe6349 (diff) | |
download | samba-2f1395ce03cea0bc7fb7ce8512df0ff82d09b2ef.tar.gz samba-2f1395ce03cea0bc7fb7ce8512df0ff82d09b2ef.tar.xz samba-2f1395ce03cea0bc7fb7ce8512df0ff82d09b2ef.zip |
If the eventscript is finished but state->ctdb is NULL,
log an error and return.
(Need to find root cause for this is soo too.)
(This used to be ctdb commit 2e80d53b73fcba58ed5a72bab66c051691ccf719)
-rw-r--r-- | ctdb/server/eventscript.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 9ba3a5d9ed..0967c00cca 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -448,6 +448,11 @@ static void ctdb_event_script_handler(struct event_context *ev, struct fd_event struct ctdb_context *ctdb = state->ctdb; int r, status; + if (ctdb == NULL) { + DEBUG(DEBUG_ERR,("Eventscript finished but ctdb is NULL\n")); + return; + } + r = read(state->fd[0], ¤t->status, sizeof(current->status)); if (r < 0) { current->status = -errno; |