dovecot: Minor optimization.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Dec 5 17:47:52 EET 2007
details: http://hg.dovecot.org/dovecot/rev/38fd7447172d
changeset: 6935:38fd7447172d
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 05 17:19:57 2007 +0200
description:
Minor optimization.
diffstat:
1 file changed, 12 insertions(+), 14 deletions(-)
src/auth/auth-client-connection.c | 26 ++++++++++++--------------
diffs (43 lines):
diff -r f6118fc9c23e -r 38fd7447172d src/auth/auth-client-connection.c
--- a/src/auth/auth-client-connection.c Wed Dec 05 17:09:07 2007 +0200
+++ b/src/auth/auth-client-connection.c Wed Dec 05 17:19:57 2007 +0200
@@ -41,19 +41,13 @@ static void auth_client_send(struct auth
static void auth_client_send(struct auth_client_connection *conn,
const char *cmd)
{
- string_t *str;
-
- t_push();
- str = t_str_new(256);
- str_append(str, cmd);
- str_append_c(str, '\n');
-
- if (conn->auth->verbose_debug) {
- i_info("client out: %s", conn->auth->verbose_debug_passwords ?
- cmd : reply_line_hide_pass(cmd));
- }
-
- (void)o_stream_send(conn->output, str_data(str), str_len(str));
+ struct const_iovec iov[2];
+
+ iov[0].iov_base = cmd;
+ iov[0].iov_len = strlen(cmd);
+ iov[1].iov_base = "\n";
+ iov[1].iov_len = 1;
+ (void)o_stream_sendv(conn->output, iov, 2);
if (o_stream_get_buffer_used_size(conn->output) >=
OUTBUF_THROTTLE_SIZE) {
@@ -62,7 +56,11 @@ static void auth_client_send(struct auth
if (conn->io != NULL)
io_remove(&conn->io);
}
- t_pop();
+
+ if (conn->auth->verbose_debug) {
+ i_info("client out: %s", conn->auth->verbose_debug_passwords ?
+ cmd : reply_line_hide_pass(cmd));
+ }
}
static void auth_callback(const char *reply,
More information about the dovecot-cvs
mailing list