From 5140f01d5c7e936855f61d7447af9c4016b10587 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Wed, 19 Dec 2001 05:19:03 +0000 Subject: Opps! Fixed a problem with negative numbers. :) --- src/reqs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/reqs.c b/src/reqs.c index 59e1c94..5200589 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -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; -- cgit v1.2.3