From: Amitay Isaacs Date: Tue, 10 Jul 2018 08:48:53 +0000 (+1000) Subject: ctdb-client: Switch to ETIMEDOUT instead of ETIME X-Git-Tag: ldb-1.5.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1236a855ffc493efb5e9cb7b295034376e56d3a;p=thirdparty%2Fsamba.git ctdb-client: Switch to ETIMEDOUT instead of ETIME BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/client/client.h b/ctdb/client/client.h index 2eec3eaed63..d4d145045e0 100644 --- a/ctdb/client/client.h +++ b/ctdb/client/client.h @@ -184,7 +184,7 @@ void ctdb_client_wait(struct tevent_context *ev, bool *done); * @param[in] ev Tevent context * @param[in] done Boolean flag to indicate when to stop waiting * @param[in] timeout How long to wait - * @return 0 on succes, ETIME on timeout, and errno on failure + * @return 0 on succes, ETIMEDOUT on timeout, and errno on failure */ int ctdb_client_wait_timeout(struct tevent_context *ev, bool *done, struct timeval timeout); diff --git a/ctdb/client/client_connect.c b/ctdb/client/client_connect.c index 1e4157e94ff..0977d717608 100644 --- a/ctdb/client/client_connect.c +++ b/ctdb/client/client_connect.c @@ -363,7 +363,7 @@ int ctdb_client_wait_timeout(struct tevent_context *ev, bool *done, talloc_free(mem_ctx); if (timed_out) { - return ETIME; + return ETIMEDOUT; } return 0; diff --git a/ctdb/tests/src/dummy_client.c b/ctdb/tests/src/dummy_client.c index 6f30512ee65..cc6444de968 100644 --- a/ctdb/tests/src/dummy_client.c +++ b/ctdb/tests/src/dummy_client.c @@ -155,7 +155,7 @@ int main(int argc, const char *argv[]) ret = ctdb_client_wait_timeout(ev, &done, tevent_timeval_current_ofs(options.timelimit, 0)); - if (ret != 0 && ret == ETIME) { + if (ret != 0 && ret == ETIMEDOUT) { D_ERR("client_wait_timeout() failed, ret=%d\n", ret); talloc_free(client); exit(1);