diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-12-19 05:19:03 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-12-19 05:19:03 +0000 |
commit | 5140f01d5c7e936855f61d7447af9c4016b10587 (patch) | |
tree | c66e51e2567c08d727fe9ebd230266532ab748ea | |
parent | 56b541d76b7eae6e2591b5a90d1bdf5e7c94b8b7 (diff) | |
download | tinyproxy-5140f01d5c7e936855f61d7447af9c4016b10587.tar.gz tinyproxy-5140f01d5c7e936855f61d7447af9c4016b10587.zip |
Opps! Fixed a problem with negative numbers. :)
Diffstat (limited to '')
-rw-r--r-- | src/reqs.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.46 2001-12-19 05:13:40 rjkaes Exp $ +/* $Id: reqs.c,v 1.47 2001-12-19 05:19:03 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections have a new thread created for them. The thread then @@ -203,8 +203,8 @@ extract_ssl_url(const char *url, struct request_s *request) static int write_message(int fd, const char *fmt, ...) { - size_t n; - size_t size = (1024 * 8); /* start with 8 KB and go from there */ + ssize_t n; + size_t size = (1024 * 2); /* start with 2 KB and go from there */ char *buf, *tmpbuf; va_list ap; @@ -216,6 +216,8 @@ write_message(int fd, const char *fmt, ...) n = vsnprintf(buf, size, fmt, ap); va_end(ap); + DEBUG2("n = %d", n); + /* If that worked, break out so we can send the buffer */ if (n > -1 && n < size) break; |