we must return it as NIL. */
str = metadata_add_entry(ctx, entry);
str_append(str, " NIL");
- o_stream_send(ctx->cmd->client->output, str_data(str), str_len(str));
+ o_stream_nsend(ctx->cmd->client->output, str_data(str), str_len(str));
}
static void cmd_getmetadata_send_entry(struct imap_getmetadata_context *ctx,
unsigned int i, count;
if (str_len(reply) > 128-10) {
- o_stream_send(output, str_data(reply), str_len(reply));
+ o_stream_nsend(output, str_data(reply), str_len(reply));
str_truncate(reply, 0);
}
str_printfa(reply, "(%u ", msgs[0]);
for (i = 1; i < count; i++) {
if (str_len(reply) > 128-10) {
- o_stream_send(output, str_data(reply),
- str_len(reply));
+ o_stream_nsend(output, str_data(reply),
+ str_len(reply));
str_truncate(reply, 0);
}
str_printfa(reply, "(%u)", msgs[i]);
reply, thread);
}
str_append(reply, "\r\n");
- o_stream_send(cmd->client->output, str_data(reply), str_len(reply));
+ o_stream_nsend(cmd->client->output, str_data(reply), str_len(reply));
array_free(&threads);
pool_unref(&pool);
if (imap_master_client_parse_input(args, pool, &input, &master_input,
&error) < 0) {
i_error("imap-master: Failed to parse client input: %s", error);
- o_stream_send_str(conn->output, t_strdup_printf(
+ o_stream_nsend_str(conn->output, t_strdup_printf(
"-Failed to parse client input: %s\n", error));
i_close_fd(&fd_client);
return -1;
}
if (imap_master_client_verify(&master_input, fd_client, &error) < 0) {
i_error("imap-master: Failed to verify client input: %s", error);
- o_stream_send_str(conn->output, t_strdup_printf(
+ o_stream_nsend_str(conn->output, t_strdup_printf(
"-Failed to verify client input: %s\n", error));
i_close_fd(&fd_client);
return -1;
/* Send a success notification before we start anything that lasts
potentially a long time. imap-hibernate process is waiting for us
to answer. Even if we fail later, we log the error anyway. */
- o_stream_send_str(conn->output, "+\n");
+ o_stream_nsend_str(conn->output, "+\n");
/* NOTE: before client_create_from_input() on failures we need to close
fd_client, but afterward it gets closed by client_destroy() */