From 0d6f5088822822e13f44b55ab5cb7191407d08de Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 3 Feb 2007 16:19:59 +0000 Subject: [PATCH] zero copy sockets do only work on page aligned buffers for page sized blocks. So remove the code that tried to take advantage of false assuming, it would work on any buffer --- opentracker.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/opentracker.c b/opentracker.c index a7d96d2..090b382 100644 --- a/opentracker.c +++ b/opentracker.c @@ -35,14 +35,8 @@ static const size_t SUCCESS_HTTP_SIZE_OFF = 17; /* To always have space for error messages ;) */ -#define static_outbuf_size 8192 -#define static_outbuf_count 64 -#define static_outbuf ( static_outbufs + static_outbuf_size * static_outbuf_off ) -#define static_outbuf_next ( static_outbuf_off = ( static_outbuf_off + 1 ) & ( static_outbuf_count - 1 ) ) - static char static_inbuf[8192]; -static char static_outbufs[ static_outbuf_size * static_outbuf_count ]; -static int static_outbuf_off = 0; +static char static_outbuf[8192]; #ifdef _DEBUG_HTTPERROR static char debug_request[8192]; @@ -146,7 +140,6 @@ static void senddata( const int64 s, char *buffer, size_t size ) { written_size = write( s, buffer, size ); if( ( written_size < 0 ) || ( written_size == size ) ) { - static_outbuf_next; free( h ); io_close( s ); } else { char * outbuf = malloc( size - written_size );