diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-11-05 21:22:23 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-11-05 21:22:23 +0000 |
commit | ac633aebdfb094b19c8c322614e3fb4739dfb0d4 (patch) | |
tree | c8b57a31ad4be62798de6c70862bfb0365e039ae /http.c | |
parent | 43ba66936aa24bde5e2e77a62365e3711cc427c2 (diff) | |
download | libevent-ac633aebdfb094b19c8c322614e3fb4739dfb0d4.tar.gz |
Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons.
svn:r1510
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -781,12 +781,12 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf) /* could not get chunk size */ return (DATA_CORRUPTED); } - if (req->body_size + ntoread > req->evcon->max_body_size) { + if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) { /* failed body length test */ event_debug(("Request body is too long")); return (DATA_TOO_LONG); } - req->body_size += ntoread; + req->body_size += (size_t)ntoread; req->ntoread = ntoread; if (req->ntoread == 0) { /* Last chunk */ @@ -2910,8 +2910,8 @@ evhttp_get_request_connection( if (evcon == NULL) return (NULL); - evhttp_connection_set_max_headers_size(evcon, http->default_max_headers_size); - evhttp_connection_set_max_body_size(evcon, http->default_max_body_size); + evcon->max_headers_size = http->default_max_headers_size; + evcon->max_body_size = http->default_max_body_size; evcon->flags |= EVHTTP_CON_INCOMING; evcon->state = EVCON_READING_FIRSTLINE; |