diff options
author | erdgeist <> | 2007-02-03 16:19:59 +0000 |
---|---|---|
committer | erdgeist <> | 2007-02-03 16:19:59 +0000 |
commit | 0d6f5088822822e13f44b55ab5cb7191407d08de (patch) | |
tree | 7b69dfef9315ac99395e247cee53f528405a9779 | |
parent | d451d32b41f9168f88cb9d41911d2e9a99009d7a (diff) |
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
-rw-r--r-- | opentracker.c | 9 |
1 files changed, 1 insertions, 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; | |||
35 | 35 | ||
36 | /* To always have space for error messages ;) */ | 36 | /* To always have space for error messages ;) */ |
37 | 37 | ||
38 | #define static_outbuf_size 8192 | ||
39 | #define static_outbuf_count 64 | ||
40 | #define static_outbuf ( static_outbufs + static_outbuf_size * static_outbuf_off ) | ||
41 | #define static_outbuf_next ( static_outbuf_off = ( static_outbuf_off + 1 ) & ( static_outbuf_count - 1 ) ) | ||
42 | |||
43 | static char static_inbuf[8192]; | 38 | static char static_inbuf[8192]; |
44 | static char static_outbufs[ static_outbuf_size * static_outbuf_count ]; | 39 | static char static_outbuf[8192]; |
45 | static int static_outbuf_off = 0; | ||
46 | 40 | ||
47 | #ifdef _DEBUG_HTTPERROR | 41 | #ifdef _DEBUG_HTTPERROR |
48 | static char debug_request[8192]; | 42 | static char debug_request[8192]; |
@@ -146,7 +140,6 @@ static void senddata( const int64 s, char *buffer, size_t size ) { | |||
146 | 140 | ||
147 | written_size = write( s, buffer, size ); | 141 | written_size = write( s, buffer, size ); |
148 | if( ( written_size < 0 ) || ( written_size == size ) ) { | 142 | if( ( written_size < 0 ) || ( written_size == size ) ) { |
149 | static_outbuf_next; | ||
150 | free( h ); io_close( s ); | 143 | free( h ); io_close( s ); |
151 | } else { | 144 | } else { |
152 | char * outbuf = malloc( size - written_size ); | 145 | char * outbuf = malloc( size - written_size ); |