From: Amitay Isaacs Date: Tue, 10 Jul 2018 08:19:09 +0000 (+1000) Subject: ctdb-common: Switch to ETIMEDOUT from ETIME X-Git-Tag: ldb-1.5.0~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a42a7232990fa163d046fb07be351ea3e0467046;p=thirdparty%2Fsamba.git ctdb-common: Switch to ETIMEDOUT from ETIME BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/common/run_event.c b/ctdb/common/run_event.c index 20e5be84dd2..a2155500f28 100644 --- a/ctdb/common/run_event.c +++ b/ctdb/common/run_event.c @@ -844,11 +844,11 @@ static void run_event_next_script(struct tevent_req *subreq) if (! state->continue_on_failure) { state->script_list->num_scripts = state->index + 1; - if (script->summary == -ETIME && pid != -1) { + if (script->summary == -ETIMEDOUT && pid != -1) { run_event_debug(req, pid); } D_NOTICE("%s event %s\n", state->event_str, - (script->summary == -ETIME) ? + (script->summary == -ETIMEDOUT) ? "timed out" : "failed"); run_event_stop_running(state->run_ctx); diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c index ee83d86da23..97895b383b9 100644 --- a/ctdb/common/run_proc.c +++ b/ctdb/common/run_proc.c @@ -452,7 +452,7 @@ static void run_proc_timedout(struct tevent_req *subreq) return; } - state->result.err = ETIME; + state->result.err = ETIMEDOUT; if (state->proc->output != NULL) { state->output = talloc_steal(state, state->proc->output); } diff --git a/ctdb/tests/cunit/run_event_001.sh b/ctdb/tests/cunit/run_event_001.sh index 6735fcbf33e..75c51111b14 100755 --- a/ctdb/tests/cunit/run_event_001.sh +++ b/ctdb/tests/cunit/run_event_001.sh @@ -106,7 +106,7 @@ ok <