if (conn->user_iter != NULL) {
/* still handshaking USER list */
- o_stream_cork(conn->output);
ret = director_connection_send_users(conn);
- o_stream_uncork(conn->output);
if (ret < 0) {
director_connection_disconnected(&conn,
o_stream_get_error(conn->output));
struct ostream *output = ibc->output;
int ret;
- o_stream_cork(ibc->output);
if ((ret = o_stream_flush(output)) < 0)
ret = 1;
else if (ibc->value_output != NULL) {
if (!dsync_ibc_is_send_queue_full(&ibc->ibc))
ibc->ibc.io_callback(ibc->ibc.io_context);
- o_stream_uncork(ibc->output);
return ret;
}
{
int ret;
- o_stream_cork(conn->output);
ret = o_stream_flush(conn->output);
if (ret > 0 && conn->cmd_input != NULL && conn->delayed_cmd == NULL)
ret = server_connection_send_cmd_input_more(conn);
- o_stream_uncork(conn->output);
if (ret < 0)
server_connection_destroy(&conn);
return ret;
static int client_output(struct client *client)
{
- o_stream_cork(client->output);
if (o_stream_flush(client->output) < 0) {
if (client->ctrl_output != NULL)
(void)o_stream_send_str(client->ctrl_output, "DISCONNECTED\n");
}
}
- o_stream_uncork(client->output);
if (client->url != NULL) {
/* url not finished yet */
return 0;
if (client->to_idle_output != NULL)
timeout_reset(client->to_idle_output);
- o_stream_cork(client->output);
if ((ret = o_stream_flush(client->output)) < 0) {
client_destroy(client, NULL);
return 1;
client_output_commands(client);
(void)cmd_sync_delayed(client);
- o_stream_uncork(client->output);
imap_refresh_proctitle();
if (client->output->closed)
client_destroy(client, NULL);
if (conn->to != NULL)
timeout_reset(conn->to);
- o_stream_cork(conn->output);
if ((ret = o_stream_flush(conn->output)) < 0)
return 1;
imapc_command_send_more(conn);
}
}
- o_stream_uncork(conn->output);
imapc_connection_unref(&conn);
return ret;
}
int ret;
lmtp_client_ref(client);
- o_stream_cork(client->output);
if ((ret = o_stream_flush(client->output)) < 0)
lmtp_client_fail(client, ERRSTR_TEMP_REMOTE_FAILURE
" (disconnected in output)");
else if (client->input_state == LMTP_INPUT_STATE_DATA)
(void)lmtp_client_send_data(client);
- o_stream_uncork(client->output);
if (client->to != NULL)
timeout_reset(client->to);
lmtp_client_unref(&client);
static int server_output(struct login_proxy *proxy)
{
proxy->last_io = ioloop_time;
- o_stream_cork(proxy->server_output);
if (o_stream_flush(proxy->server_output) < 0) {
login_proxy_free_ostream(&proxy, proxy->server_output, TRUE);
return 1;
}
- o_stream_uncork(proxy->server_output);
if (proxy->client_io == NULL &&
o_stream_get_buffer_used_size(proxy->server_output) <
static int proxy_client_output(struct login_proxy *proxy)
{
proxy->last_io = ioloop_time;
- o_stream_cork(proxy->client_output);
if (o_stream_flush(proxy->client_output) < 0) {
login_proxy_free_ostream(&proxy, proxy->client_output, FALSE);
return 1;
}
- o_stream_uncork(proxy->client_output);
if (proxy->server_io == NULL &&
o_stream_get_buffer_used_size(proxy->client_output) <
static int client_output(struct client *client)
{
- o_stream_cork(client->output);
if (o_stream_flush(client->output) < 0) {
client_destroy(client, NULL);
return 1;
}
}
- o_stream_uncork(client->output);
if (client->cmd != NULL) {
/* command not finished yet */
return 0;
{
int ret = 1;
- o_stream_cork(client->output);
if (o_stream_flush(client->output) < 0) {
client_destroy(&client);
return 1;
}
if (client->cmd_more != NULL)
ret = client->cmd_more(client);
- o_stream_uncork(client->output);
if (ret > 0) {
client->cmd_more = NULL;