Skip to content

Commit

Permalink
lib: remove autoclose parameter from [io]_stream_create_fd
Browse files Browse the repository at this point in the history
Use [io]_stream_create_fd_autoclose() for autoclose.
  • Loading branch information
mrannanj authored and GitLab committed Jun 6, 2016
1 parent 39dea5f commit e93184a
Show file tree
Hide file tree
Showing 97 changed files with 200 additions and 199 deletions.
4 changes: 2 additions & 2 deletions src/anvil/anvil-connection.c
Expand Up @@ -189,9 +189,9 @@ anvil_connection_create(int fd, bool master, bool fifo)

conn = i_new(struct anvil_connection, 1);
conn->fd = fd;
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
if (!fifo) {
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
}
conn->io = io_add(fd, IO_READ, anvil_connection_input, conn);
Expand Down
5 changes: 2 additions & 3 deletions src/auth/auth-client-connection.c
Expand Up @@ -317,9 +317,8 @@ void auth_client_connection_create(struct auth *auth, int fd,
random_fill(conn->cookie, sizeof(conn->cookie));

conn->fd = fd;
conn->input = i_stream_create_fd(fd, AUTH_CLIENT_MAX_LINE_LENGTH,
FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, AUTH_CLIENT_MAX_LINE_LENGTH);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
o_stream_set_flush_callback(conn->output, auth_client_output, conn);
conn->io = io_add(fd, IO_READ, auth_client_input, conn);
Expand Down
4 changes: 2 additions & 2 deletions src/auth/auth-master-connection.c
Expand Up @@ -747,8 +747,8 @@ auth_master_connection_create(struct auth *auth, int fd,
conn->fd = fd;
conn->path = i_strdup(path);
conn->auth = auth;
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
o_stream_set_flush_callback(conn->output, master_output, conn);
conn->io = io_add(fd, IO_READ, master_input, conn);
Expand Down
4 changes: 2 additions & 2 deletions src/auth/auth-postfix-connection.c
Expand Up @@ -176,8 +176,8 @@ auth_postfix_connection_create(struct auth *auth, int fd)
conn->refcount = 1;
conn->fd = fd;
conn->auth = auth;
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->io = io_add(fd, IO_READ, postfix_input, conn);
DLLIST_PREPEND(&auth_postfix_connections, conn);
Expand Down
5 changes: 2 additions & 3 deletions src/auth/auth-worker-client.c
Expand Up @@ -739,9 +739,8 @@ auth_worker_client_create(struct auth *auth, int fd)

client->auth = auth;
client->fd = fd;
client->input = i_stream_create_fd(fd, AUTH_WORKER_MAX_LINE_LENGTH,
FALSE);
client->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
client->input = i_stream_create_fd(fd, AUTH_WORKER_MAX_LINE_LENGTH);
client->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(client->output, TRUE);
o_stream_set_flush_callback(client->output, auth_worker_output, client);
client->io = io_add(fd, IO_READ, auth_worker_input, client);
Expand Down
5 changes: 2 additions & 3 deletions src/auth/auth-worker-server.c
Expand Up @@ -192,9 +192,8 @@ static struct auth_worker_connection *auth_worker_create(void)

conn = i_new(struct auth_worker_connection, 1);
conn->fd = fd;
conn->input = i_stream_create_fd(fd, AUTH_WORKER_MAX_LINE_LENGTH,
FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, AUTH_WORKER_MAX_LINE_LENGTH);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->io = io_add(fd, IO_READ, worker_input, conn);
conn->to = timeout_add(AUTH_WORKER_MAX_IDLE_SECS * 1000,
Expand Down
2 changes: 1 addition & 1 deletion src/auth/db-passwd-file.c
Expand Up @@ -200,7 +200,7 @@ static int passwd_file_open(struct passwd_file *pw, bool startup,
hash_table_create(&pw->users, pw->pool, 0, str_hash, strcmp);

start_time = time(NULL);
input = i_stream_create_fd(pw->fd, (size_t)-1, FALSE);
input = i_stream_create_fd(pw->fd, (size_t)-1);
i_stream_set_return_partial_line(input, TRUE);
while ((line = i_stream_read_next_line(input)) != NULL) {
if (*line == '\0' || *line == ':' || *line == '#')
Expand Down
4 changes: 2 additions & 2 deletions src/config/config-connection.c
Expand Up @@ -194,8 +194,8 @@ struct config_connection *config_connection_create(int fd)

conn = i_new(struct config_connection, 1);
conn->fd = fd;
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->io = io_add(fd, IO_READ, config_connection_input, conn);
DLLIST_PREPEND(&config_connections, conn);
Expand Down
2 changes: 1 addition & 1 deletion src/config/doveconf.c
Expand Up @@ -434,7 +434,7 @@ config_dump_human(const struct config_filter *filter, const char *const *modules
struct ostream *output;
int ret;

output = o_stream_create_fd(STDOUT_FILENO, 0, FALSE);
output = o_stream_create_fd(STDOUT_FILENO, 0);
o_stream_set_no_error_handling(output, TRUE);
o_stream_cork(output);

Expand Down
5 changes: 2 additions & 3 deletions src/dict/dict-connection.c
Expand Up @@ -201,9 +201,8 @@ struct dict_connection *dict_connection_create(int fd)
conn = i_new(struct dict_connection, 1);
conn->refcount = 1;
conn->fd = fd;
conn->input = i_stream_create_fd(fd, DICT_CLIENT_MAX_LINE_LENGTH,
FALSE);
conn->output = o_stream_create_fd(fd, 128*1024, FALSE);
conn->input = i_stream_create_fd(fd, DICT_CLIENT_MAX_LINE_LENGTH);
conn->output = o_stream_create_fd(fd, 128*1024);
o_stream_set_no_error_handling(conn->output, TRUE);
o_stream_set_flush_callback(conn->output, dict_connection_output, conn);
conn->io = io_add(fd, IO_READ, dict_connection_input, conn);
Expand Down
5 changes: 2 additions & 3 deletions src/director/auth-connection.c
Expand Up @@ -85,9 +85,8 @@ int auth_connection_connect(struct auth_connection *conn)
return -1;
}

conn->input = i_stream_create_fd(conn->fd, AUTH_CLIENT_MAX_LINE_LENGTH,
FALSE);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(conn->fd, AUTH_CLIENT_MAX_LINE_LENGTH);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->io = io_add(conn->fd, IO_READ, auth_connection_input, conn);
return 0;
Expand Down
4 changes: 2 additions & 2 deletions src/director/director-connection.c
Expand Up @@ -1851,8 +1851,8 @@ director_connection_init_common(struct director *dir, int fd)
conn->created = ioloop_time;
conn->fd = fd;
conn->dir = dir;
conn->input = i_stream_create_fd(conn->fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(conn->fd, MAX_OUTBUF_SIZE, FALSE);
conn->input = i_stream_create_fd(conn->fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(conn->fd, MAX_OUTBUF_SIZE);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->to_ping = timeout_add(DIRECTOR_CONNECTION_ME_TIMEOUT_MSECS,
director_connection_init_timeout, conn);
Expand Down
14 changes: 7 additions & 7 deletions src/director/director-test.c
Expand Up @@ -246,8 +246,8 @@ static void imap_client_create(int fd)

client = i_new(struct imap_client, 1);
client->fd = fd;
client->input = i_stream_create_fd(fd, 4096, FALSE);
client->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
client->input = i_stream_create_fd(fd, 4096);
client->output = o_stream_create_fd(fd, (size_t)-1);
o_stream_set_no_error_handling(client->output, TRUE);
client->io = io_add(fd, IO_READ, imap_client_input, client);
client->parser =
Expand Down Expand Up @@ -344,15 +344,15 @@ director_connection_create(int in_fd, const struct ip_addr *local_ip,

conn = i_new(struct director_connection, 1);
conn->in_fd = in_fd;
conn->in_input = i_stream_create_fd(conn->in_fd, (size_t)-1, FALSE);
conn->in_output = o_stream_create_fd(conn->in_fd, (size_t)-1, FALSE);
conn->in_input = i_stream_create_fd(conn->in_fd, (size_t)-1);
conn->in_output = o_stream_create_fd(conn->in_fd, (size_t)-1);
o_stream_set_no_error_handling(conn->in_output, TRUE);
conn->in_io = io_add(conn->in_fd, IO_READ,
director_connection_in_input, conn);

conn->out_fd = out_fd;
conn->out_input = i_stream_create_fd(conn->out_fd, (size_t)-1, FALSE);
conn->out_output = o_stream_create_fd(conn->out_fd, (size_t)-1, FALSE);
conn->out_input = i_stream_create_fd(conn->out_fd, (size_t)-1);
conn->out_output = o_stream_create_fd(conn->out_fd, (size_t)-1);
o_stream_set_no_error_handling(conn->out_output, TRUE);
conn->out_io = io_add(conn->out_fd, IO_READ,
director_connection_out_input, conn);
Expand Down Expand Up @@ -459,7 +459,7 @@ static struct admin_connection *admin_connect(const char *path)
admin_random_action, conn);

net_set_nonblock(conn->fd, FALSE);
conn->input = i_stream_create_fd(conn->fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(conn->fd, (size_t)-1);
admin_send(conn, DIRECTOR_ADMIN_HANDSHAKE);

line = i_stream_read_next_line(conn->input);
Expand Down
4 changes: 2 additions & 2 deletions src/director/doveadm-connection.c
Expand Up @@ -686,8 +686,8 @@ doveadm_connection_init(struct director *dir, int fd)
conn = i_new(struct doveadm_connection, 1);
conn->fd = fd;
conn->dir = dir;
conn->input = i_stream_create_fd(conn->fd, 1024, FALSE);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(conn->fd, 1024);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
conn->io = io_add(conn->fd, IO_READ, doveadm_connection_input, conn);
o_stream_nsend_str(conn->output, DOVEADM_HANDSHAKE);
Expand Down
4 changes: 2 additions & 2 deletions src/director/login-connection.c
Expand Up @@ -262,7 +262,7 @@ login_connection_init(struct director *dir, int fd,
conn->refcount = 1;
conn->fd = fd;
conn->dir = dir;
conn->output = o_stream_create_fd(conn->fd, (size_t)-1, FALSE);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1);
o_stream_set_no_error_handling(conn->output, TRUE);
if (type != LOGIN_CONNECTION_TYPE_AUTHREPLY) {
i_assert(auth != NULL);
Expand All @@ -272,7 +272,7 @@ login_connection_init(struct director *dir, int fd,
auth_connection_set_callback(conn->auth, auth_input_line, conn);
} else {
i_assert(auth == NULL);
conn->input = i_stream_create_fd(conn->fd, IO_BLOCK_SIZE, FALSE);
conn->input = i_stream_create_fd(conn->fd, IO_BLOCK_SIZE);
conn->io = io_add(conn->fd, IO_READ,
login_connection_authreply_input, conn);
o_stream_nsend_str(conn->output, t_strdup_printf(
Expand Down
2 changes: 1 addition & 1 deletion src/director/notify-connection.c
Expand Up @@ -56,7 +56,7 @@ notify_connection_init(struct director *dir, int fd)
conn = i_new(struct notify_connection, 1);
conn->fd = fd;
conn->dir = dir;
conn->input = i_stream_create_fd(conn->fd, 1024, FALSE);
conn->input = i_stream_create_fd(conn->fd, 1024);
conn->io = io_add(conn->fd, IO_READ, notify_connection_input, conn);
return conn;
}
Expand Down
4 changes: 2 additions & 2 deletions src/dns/dns-client.c
Expand Up @@ -93,8 +93,8 @@ static struct dns_client *dns_client_create(int fd)

client = i_new(struct dns_client, 1);
client->fd = fd;
client->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
client->output = o_stream_create_fd(fd, MAX_OUTBUF_SIZE, FALSE);
client->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
client->output = o_stream_create_fd(fd, MAX_OUTBUF_SIZE);
o_stream_set_no_error_handling(client->output, TRUE);
client->io = io_add(fd, IO_READ, dns_client_input, client);
return client;
Expand Down
4 changes: 2 additions & 2 deletions src/doveadm/client-connection.c
Expand Up @@ -548,8 +548,8 @@ client_connection_create(int fd, int listen_fd, bool ssl)
doveadm_print_init(DOVEADM_PRINT_TYPE_SERVER);

conn->io = io_add(fd, IO_READ, client_connection_input, conn);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(fd, (size_t)-1);
i_stream_set_name(conn->input, net_ip2addr(&conn->remote_ip));
o_stream_set_name(conn->output, net_ip2addr(&conn->remote_ip));
o_stream_set_no_error_handling(conn->output, TRUE);
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-cmd.c
Expand Up @@ -423,7 +423,7 @@ static void doveadm_fill_param(struct doveadm_cmd_param *param,
case CMD_PARAM_ISTREAM: {
struct istream *is;
if (strcmp(value,"-") == 0) {
is = i_stream_create_fd(STDIN_FILENO, IO_BLOCK_SIZE, FALSE);
is = i_stream_create_fd(STDIN_FILENO, IO_BLOCK_SIZE);
} else {
is = i_stream_create_file(value, IO_BLOCK_SIZE);
}
Expand Down
6 changes: 3 additions & 3 deletions src/doveadm/doveadm-dsync.c
Expand Up @@ -180,7 +180,7 @@ run_cmd(struct dsync_cmd_context *ctx, const char *const *args)
}

fd_set_nonblock(ctx->fd_err, TRUE);
ctx->err_stream = i_stream_create_fd(ctx->fd_err, IO_BLOCK_SIZE, FALSE);
ctx->err_stream = i_stream_create_fd(ctx->fd_err, IO_BLOCK_SIZE);
i_stream_set_return_partial_line(ctx->err_stream, TRUE);
}

Expand Down Expand Up @@ -486,8 +486,8 @@ cmd_dsync_icb_stream_init(struct dsync_cmd_context *ctx,
if (ctx->input == NULL) {
fd_set_nonblock(ctx->fd_in, TRUE);
fd_set_nonblock(ctx->fd_out, TRUE);
ctx->input = i_stream_create_fd(ctx->fd_in, (size_t)-1, FALSE);
ctx->output = o_stream_create_fd(ctx->fd_out, (size_t)-1, FALSE);
ctx->input = i_stream_create_fd(ctx->fd_in, (size_t)-1);
ctx->output = o_stream_create_fd(ctx->fd_out, (size_t)-1);
} else {
ctx->input_orig_bufsize = i_stream_get_max_buffer_size(ctx->input);
ctx->output_orig_bufsize = o_stream_get_max_buffer_size(ctx->output);
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm-mail.c
Expand Up @@ -221,7 +221,7 @@ void doveadm_mail_get_input(struct doveadm_mail_cmd_context *ctx)
if (ctx->conn != NULL)
inputs[0] = i_stream_create_dot(ctx->conn->input, FALSE);
else {
inputs[0] = i_stream_create_fd(STDIN_FILENO, 1024*1024, FALSE);
inputs[0] = i_stream_create_fd(STDIN_FILENO, 1024*1024);
i_stream_set_name(inputs[0], "stdin");
}
inputs[1] = NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/doveadm/doveadm-stats.c
Expand Up @@ -480,7 +480,7 @@ static void stats_top(const char *path, const char *sort_type)
hash_table_create(&ctx.sessions, default_pool, 0, str_hash, strcmp);
net_set_nonblock(ctx.fd, FALSE);

ctx.input = i_stream_create_fd(ctx.fd, (size_t)-1, FALSE);
ctx.input = i_stream_create_fd(ctx.fd, (size_t)-1);

if (strstr(sort_type, "cpu") != NULL)
ctx.lines_sort = sort_cpu;
Expand All @@ -507,7 +507,7 @@ static void stats_reset(const char *path, const char **items ATTR_UNUSED)

fd = doveadm_connect(path);
net_set_nonblock(fd, FALSE);
input = i_stream_create_fd(fd, (size_t)-1, FALSE);
input = i_stream_create_fd(fd, (size_t)-1);

cmd = t_str_new(10);
str_append(cmd, "RESET");
Expand Down
4 changes: 2 additions & 2 deletions src/doveadm/doveadm-zlib.c
Expand Up @@ -163,8 +163,8 @@ static void cmd_zlibconnect(int argc ATTR_UNUSED, char *argv[])

memset(&client, 0, sizeof(client));
client.fd = fd;
client.input = i_stream_create_fd(fd, (size_t)-1, FALSE);
client.output = o_stream_create_fd(fd, 0, FALSE);
client.input = i_stream_create_fd(fd, (size_t)-1);
client.output = o_stream_create_fd(fd, 0);
o_stream_set_no_error_handling(client.output, TRUE);
client.io_client = io_add(STDIN_FILENO, IO_READ, client_input, &client);
client.io_server = io_add(fd, IO_READ, server_input, &client);
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/doveadm.c
Expand Up @@ -346,7 +346,7 @@ int main(int argc, char *argv[])
quick_init = TRUE;
} else {
quick_init = FALSE;
doveadm_print_ostream = o_stream_create_fd(STDOUT_FILENO, 0, FALSE);
doveadm_print_ostream = o_stream_create_fd(STDOUT_FILENO, 0);
o_stream_set_no_error_handling(doveadm_print_ostream, TRUE);
doveadm_dump_init();
doveadm_mail_init();
Expand Down
4 changes: 2 additions & 2 deletions src/doveadm/server-connection.c
Expand Up @@ -469,8 +469,8 @@ int server_connection_create(struct doveadm_server *server,
doveadm_settings->doveadm_port);
net_set_nonblock(conn->fd, TRUE);
conn->io = io_add(conn->fd, IO_READ, server_connection_input, conn);
conn->input = i_stream_create_fd(conn->fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1, FALSE);
conn->input = i_stream_create_fd(conn->fd, MAX_INBUF_SIZE);
conn->output = o_stream_create_fd(conn->fd, (size_t)-1);
o_stream_set_flush_callback(conn->output, server_connection_output, conn);

i_stream_set_name(conn->input, server->name);
Expand Down
2 changes: 1 addition & 1 deletion src/imap-hibernate/imap-client.c
Expand Up @@ -421,7 +421,7 @@ imap_client_create(int fd, const struct imap_client_state *state)
client = p_new(pool, struct imap_client, 1);
client->pool = pool;
client->fd = fd;
client->input = i_stream_create_fd(fd, IMAP_MAX_INBUF, FALSE);
client->input = i_stream_create_fd(fd, IMAP_MAX_INBUF);

client->state = *state;
client->state.username = p_strdup(pool, state->username);
Expand Down
7 changes: 3 additions & 4 deletions src/imap-urlauth/imap-urlauth-client.c
Expand Up @@ -89,7 +89,7 @@ int client_create(const char *username, int fd_in, int fd_out,
if (username != NULL)
client->username = i_strdup(username);

client->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE);
client->output = o_stream_create_fd(fd_out, (size_t)-1);

imap_urlauth_client_count++;
DLLIST_PREPEND(&imap_urlauth_clients, client);
Expand Down Expand Up @@ -171,8 +171,7 @@ static int client_worker_connect(struct client *client)
return -1;
}

client->ctrl_output =
o_stream_create_fd(client->fd_ctrl, (size_t)-1, FALSE);
client->ctrl_output = o_stream_create_fd(client->fd_ctrl, (size_t)-1);

/* send protocol version handshake */
if (o_stream_send_str(client->ctrl_output, handshake) < 0) {
Expand All @@ -182,7 +181,7 @@ static int client_worker_connect(struct client *client)
}

client->ctrl_input =
i_stream_create_fd(client->fd_ctrl, MAX_INBUF_SIZE, FALSE);
i_stream_create_fd(client->fd_ctrl, MAX_INBUF_SIZE);
client->ctrl_io =
io_add(client->fd_ctrl, IO_READ, client_worker_input, client);
return 0;
Expand Down
13 changes: 6 additions & 7 deletions src/imap-urlauth/imap-urlauth-worker.c
Expand Up @@ -193,8 +193,8 @@ client_create_standalone(const char *access_user,
}
client->debug = debug;

client->input = i_stream_create_fd(fd_in, MAX_INBUF_SIZE, FALSE);
client->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE);
client->input = i_stream_create_fd(fd_in, MAX_INBUF_SIZE);
client->output = o_stream_create_fd(fd_out, (size_t)-1);
client->io = io_add(fd_in, IO_READ, client_input, client);
client->to_idle = timeout_add(CLIENT_IDLE_TIMEOUT_MSECS,
client_idle_timeout, client);
Expand Down Expand Up @@ -793,9 +793,8 @@ client_ctrl_read_fds(struct client *client)
}

client->ctrl_input =
i_stream_create_fd(client->fd_ctrl, MAX_INBUF_SIZE, FALSE);
client->ctrl_output =
o_stream_create_fd(client->fd_ctrl, (size_t)-1, FALSE);
i_stream_create_fd(client->fd_ctrl, MAX_INBUF_SIZE);
client->ctrl_output = o_stream_create_fd(client->fd_ctrl, (size_t)-1);
return 1;
}

Expand Down Expand Up @@ -913,8 +912,8 @@ static void client_ctrl_input(struct client *client)
return;
}

client->input = i_stream_create_fd(client->fd_in, MAX_INBUF_SIZE, FALSE);
client->output = o_stream_create_fd(client->fd_out, (size_t)-1, FALSE);
client->input = i_stream_create_fd(client->fd_in, MAX_INBUF_SIZE);
client->output = o_stream_create_fd(client->fd_out, (size_t)-1);
client->io = io_add(client->fd_in, IO_READ, client_input, client);
o_stream_set_flush_callback(client->output, client_output, client);

Expand Down

0 comments on commit e93184a

Please sign in to comment.