dovecot-2.2: lib-http server: Use io_add_istream() to wait for t...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 15 13:02:18 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/74e5657964d3
changeset: 17723:74e5657964d3
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 15 16:00:07 2014 +0300
description:
lib-http server: Use io_add_istream() to wait for the payload istream.
This way the stream doesn't necessarily have to have a fd.
diffstat:
src/lib-http/http-server-response.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diffs (25 lines):
diff -r 8e6d2afb14c5 -r 74e5657964d3 src/lib-http/http-server-response.c
--- a/src/lib-http/http-server-response.c Fri Aug 15 15:59:17 2014 +0300
+++ b/src/lib-http/http-server-response.c Fri Aug 15 16:00:07 2014 +0300
@@ -204,7 +204,6 @@
struct http_server_connection *conn = resp->request->conn;
struct ostream *output = resp->payload_output;
off_t ret;
- int fd;
*error_r = NULL;
@@ -251,11 +250,9 @@
//http_server_response_debug(resp, "Partially sent payload");
} else {
/* input is blocking */
- fd = i_stream_get_fd(resp->payload_input);
conn->output_locked = TRUE;
- i_assert(fd >= 0);
- conn->io_resp_payload = io_add
- (fd, IO_READ, http_server_response_payload_input, resp);
+ conn->io_resp_payload = io_add_istream(resp->payload_input,
+ http_server_response_payload_input, resp);
}
return ret < 0 ? -1 : 0;
}
More information about the dovecot-cvs
mailing list