1
0
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:
Martin Schwenke 2015-07-06 11:48:28 +10:00 committed by Amitay Isaacs
parent f951ff1383
commit b71d18d2dc

View File

@ -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;
}