mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-tools: Avoiding printing "(null)" on "ctdb eventscript" error
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
f951ff1383
commit
b71d18d2dc
@ -5356,7 +5356,12 @@ static int control_eventscript(struct ctdb_context *ctdb, int argc, const char *
|
||||
ret = ctdb_control(ctdb, options.pnn, 0, CTDB_CONTROL_RUN_EVENTSCRIPTS,
|
||||
0, data, tmp_ctx, NULL, &res, NULL, &errmsg);
|
||||
if (ret != 0 || res != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to run eventscripts - %s\n", errmsg));
|
||||
if (errmsg != NULL) {
|
||||
DEBUG(DEBUG_ERR,
|
||||
("Failed to run eventscripts - %s\n", errmsg));
|
||||
} else {
|
||||
DEBUG(DEBUG_ERR, ("Failed to run eventscripts\n"));
|
||||
}
|
||||
talloc_free(tmp_ctx);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user