Mercurial > dovecot > core-2.2
comparison src/director/login-connection.c @ 18670:d54dc360cd3c
director: Minor code cleanup - allow access to auth connection's ostream directly.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 13 May 2015 13:57:24 +0300 |
parents | 67fdd6f962f5 |
children | 52cdf321fa07 |
comparison
equal
deleted
inserted
replaced
18669:67fdd6f962f5 | 18670:d54dc360cd3c |
---|---|
42 | 42 |
43 static void login_connection_unref(struct login_connection **_conn); | 43 static void login_connection_unref(struct login_connection **_conn); |
44 | 44 |
45 static void login_connection_input(struct login_connection *conn) | 45 static void login_connection_input(struct login_connection *conn) |
46 { | 46 { |
47 struct ostream *output; | |
47 unsigned char buf[4096]; | 48 unsigned char buf[4096]; |
48 ssize_t ret; | 49 ssize_t ret; |
49 | 50 |
50 ret = read(conn->fd, buf, sizeof(buf)); | 51 ret = read(conn->fd, buf, sizeof(buf)); |
51 if (ret <= 0) { | 52 if (ret <= 0) { |
56 i_error("read(login connection) failed: %m"); | 57 i_error("read(login connection) failed: %m"); |
57 } | 58 } |
58 login_connection_deinit(&conn); | 59 login_connection_deinit(&conn); |
59 return; | 60 return; |
60 } | 61 } |
61 auth_connection_send(conn->auth, buf, ret); | 62 output = auth_connection_get_output(conn->auth); |
63 o_stream_nsend(output, buf, ret); | |
62 } | 64 } |
63 | 65 |
64 static void | 66 static void |
65 login_connection_send_line(struct login_connection *conn, const char *line) | 67 login_connection_send_line(struct login_connection *conn, const char *line) |
66 { | 68 { |