From 4b8890020398c1c303c432d026e3e3afb13bd4f9 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Thu, 20 Apr 2017 15:26:13 +0300 Subject: [PATCH] odissey: update machinarium; set default io timeout to INT_MAX --- core/od_auth.c | 6 +++--- core/od_be.c | 6 +++--- core/od_cancel.c | 2 +- core/od_fe.c | 2 +- core/od_io.c | 2 +- core/od_pooler.c | 2 +- core/od_router_copy.c | 2 +- core/od_router_session.c | 2 +- core/od_router_transaction.c | 2 +- core/od_tls.c | 2 +- lib/machinarium | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/od_auth.c b/core/od_auth.c index 5176a58c..9634c2a1 100644 --- a/core/od_auth.c +++ b/core/od_auth.c @@ -58,7 +58,7 @@ od_authfe_cleartext(od_client_t *client) /* wait for password response */ while (1) { - rc = od_read(client->io, stream, 0); + rc = od_read(client->io, stream, INT_MAX); if (rc == -1) { od_error(&pooler->od->log, client->io, "C (auth): read error: %s", machine_error(client->io)); @@ -126,7 +126,7 @@ od_authfe_md5(od_client_t *client) /* wait for password response */ while (1) { int rc; - rc = od_read(client->io, stream, 0); + rc = od_read(client->io, stream, INT_MAX); if (rc == -1) { od_error(&pooler->od->log, client->io, "C (auth): read error: %s", machine_error(client->io)); @@ -380,7 +380,7 @@ int od_authbe(od_server_t *server) /* wait for authentication response */ while (1) { int rc; - rc = od_read(server->io, &server->stream, 0); + rc = od_read(server->io, &server->stream, INT_MAX); if (rc == -1) { od_error(&pooler->od->log, server->io, "S (auth): read error: %s", machine_error(server->io)); diff --git a/core/od_be.c b/core/od_be.c index 4bc85a38..cf6f3bf3 100644 --- a/core/od_be.c +++ b/core/od_be.c @@ -107,7 +107,7 @@ od_besetup(od_server_t *server) so_stream_t *stream = &server->stream; while (1) { int rc; - rc = od_read(server->io, &server->stream, 0); + rc = od_read(server->io, &server->stream, INT_MAX); if (rc == -1) { od_error(&pooler->od->log, server->io, "S (setup): write error: %s", machine_error(server->io)); @@ -189,7 +189,7 @@ od_beconnect(od_pooler_t *pooler, od_server_t *server) assert(ai != NULL); /* connect to server */ - rc = machine_connect(server->io, ai->ai_addr, 0); + rc = machine_connect(server->io, ai->ai_addr, INT_MAX); freeaddrinfo(ai); if (rc < 0) { od_error(&pooler->od->log, NULL, "failed to connect to %s:%d", @@ -404,7 +404,7 @@ od_bequery(od_server_t *server, char *procedure, char *query, int len) return -1; } server->count_request++; - rc = od_beready_wait(server, procedure, 0); + rc = od_beready_wait(server, procedure, INT_MAX); if (rc == -1) return -1; return 0; diff --git a/core/od_cancel.c b/core/od_cancel.c index ce9d2604..2e95f61f 100644 --- a/core/od_cancel.c +++ b/core/od_cancel.c @@ -85,7 +85,7 @@ int od_cancel_of(od_pooler_t *pooler, machine_set_keepalive(io, 1, pooler->od->scheme.keepalive); /* connect to server */ - rc = machine_connect(io, ai->ai_addr, 0); + rc = machine_connect(io, ai->ai_addr, INT_MAX); freeaddrinfo(ai); if (rc < 0) { od_error(&pooler->od->log, NULL, diff --git a/core/od_fe.c b/core/od_fe.c index b1e666cd..9e9f78ea 100644 --- a/core/od_fe.c +++ b/core/od_fe.c @@ -99,7 +99,7 @@ od_festartup_read(od_client_t *client) int rc = so_stream_ensure(stream, to_read); if (rc == -1) return -1; - rc = machine_read(client->io, (char*)stream->p, to_read, 0); + rc = machine_read(client->io, (char*)stream->p, to_read, INT_MAX); if (rc < 0) { od_error(&pooler->od->log, client->io, "C (startup): read error: %s", diff --git a/core/od_io.c b/core/od_io.c index 77a95b82..2794d157 100644 --- a/core/od_io.c +++ b/core/od_io.c @@ -50,7 +50,7 @@ int od_read(machine_io_t io, so_stream_t *stream, int time_ms) int od_write(machine_io_t io, so_stream_t *stream) { int rc; - rc = machine_write(io, (char*)stream->s, so_stream_used(stream), 0); + rc = machine_write(io, (char*)stream->s, so_stream_used(stream), INT_MAX); if (rc < 0) return -1; return 0; diff --git a/core/od_pooler.c b/core/od_pooler.c index 6e03360d..40c05c98 100644 --- a/core/od_pooler.c +++ b/core/od_pooler.c @@ -109,7 +109,7 @@ od_pooler(void *arg) while (machine_active(pooler->env)) { machine_io_t client_io; - rc = machine_accept(pooler->server, &client_io, env->scheme.backlog, 0); + rc = machine_accept(pooler->server, &client_io, env->scheme.backlog, INT_MAX); if (rc < 0) { od_error(&env->log, NULL, "accept failed"); continue; diff --git a/core/od_router_copy.c b/core/od_router_copy.c index 4e791a81..25e598dd 100644 --- a/core/od_router_copy.c +++ b/core/od_router_copy.c @@ -54,7 +54,7 @@ od_router_copy_in(od_client_t *client) int rc, type; so_stream_t *stream = &client->stream; for (;;) { - rc = od_read(client->io, stream, 0); + rc = od_read(client->io, stream, INT_MAX); if (rc == -1) return OD_RS_ECLIENT_READ; type = *stream->s; diff --git a/core/od_router_session.c b/core/od_router_session.c index dc932cd7..0bd1ebfd 100644 --- a/core/od_router_session.c +++ b/core/od_router_session.c @@ -90,7 +90,7 @@ od_router_session(od_client_t *client) for (;;) { /* client to server */ - rc = od_read(client->io, stream, 0); + rc = od_read(client->io, stream, INT_MAX); if (rc == -1) return OD_RS_ECLIENT_READ; type = *stream->s; diff --git a/core/od_router_transaction.c b/core/od_router_transaction.c index 359f2dcc..e2719563 100644 --- a/core/od_router_transaction.c +++ b/core/od_router_transaction.c @@ -78,7 +78,7 @@ od_router_transaction(od_client_t *client) for (;;) { /* client to server */ - rc = od_read(client->io, stream, 0); + rc = od_read(client->io, stream, INT_MAX); if (rc == -1) return OD_RS_ECLIENT_READ; type = *stream->s; diff --git a/core/od_tls.c b/core/od_tls.c index 9747110c..3d1ffc1c 100644 --- a/core/od_tls.c +++ b/core/od_tls.c @@ -197,7 +197,7 @@ od_tlsbe_connect(machine_t machine, /* read server reply */ so_stream_reset(stream); - rc = machine_read(io, (char*)stream->p, 1, 0); + rc = machine_read(io, (char*)stream->p, 1, INT_MAX); if (rc < 0) { od_error(log, io, "%s (tls): read error: %s", prefix, machine_error(io)); diff --git a/lib/machinarium b/lib/machinarium index e04e4c99..40500d57 160000 --- a/lib/machinarium +++ b/lib/machinarium @@ -1 +1 @@ -Subproject commit e04e4c990375f0b722e8a11a0b811d76aebcfea0 +Subproject commit 40500d578a697e6c35428abeb529c99b31f7d60e