odissey: update machinarium; set default io timeout to INT_MAX

This commit is contained in:
Dmitry Simonenko 2017-04-20 15:26:13 +03:00
parent cb64abadcb
commit 4b88900203
11 changed files with 15 additions and 15 deletions

View File

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

View File

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

View File

@ -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,

View File

@ -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",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

@ -1 +1 @@
Subproject commit e04e4c990375f0b722e8a11a0b811d76aebcfea0
Subproject commit 40500d578a697e6c35428abeb529c99b31f7d60e