git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671eff3
)
If the eventscript is finished but state->ctdb is NULL,
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Mon, 11 Apr 2011 19:24:43 +0000
(
05:24
+1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Mon, 11 Apr 2011 20:36:25 +0000
(06:36 +1000)
log an error and return.
(Need to find root cause for this is soo too.)
server/eventscript.c
patch
|
blob
|
history
diff --git
a/server/eventscript.c
b/server/eventscript.c
index 9ba3a5d9ed802bdb2fe7c1f52bd506f6b7d4f080..0967c00cca4f286ecc5565ac93261a26aa834099 100644
(file)
--- a/
server/eventscript.c
+++ b/
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;