summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/opentracker.c b/opentracker.c
index 29c4ac7..212defc 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -217,11 +217,9 @@ static void handle_write( const int64 sock ) {
217 chunked = 1; 217 chunked = 1;
218 218
219 for( i = 0; i < cookie->batches; ++i ) { 219 for( i = 0; i < cookie->batches; ++i ) {
220 fprintf(stderr, "handle_write inspects batch %zu of %zu (bytes left: %llu)\n", i, cookie->batches, cookie->batch[i].bytesleft);
221 if( cookie->batch[i].bytesleft ) { 220 if( cookie->batch[i].bytesleft ) {
222 int64 res = iob_send( sock, cookie->batch + i ); 221 int64 res = iob_send( sock, cookie->batch + i );
223 222
224 fprintf(stderr, "handle_write yields res %lld when trying to iob_send\n", res);
225 if( res == -3 ) { 223 if( res == -3 ) {
226 handle_dead( sock ); 224 handle_dead( sock );
227 return; 225 return;
@@ -237,13 +235,10 @@ static void handle_write( const int64 sock ) {
237 } 235 }
238 236
239 /* In a chunked transfer after all batches accumulated have been sent, wait for the next one */ 237 /* In a chunked transfer after all batches accumulated have been sent, wait for the next one */
240 if( chunked ) { 238 if( chunked )
241fprintf( stderr, "handle_write is STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER => dont want write on sock %lld\n", sock);
242 io_dontwantwrite( sock ); 239 io_dontwantwrite( sock );
243 } else { 240 else
244fprintf( stderr, "handle_write is STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER => handle dead on sock %lld\n", sock);
245 handle_dead( sock ); 241 handle_dead( sock );
246 }
247} 242}
248 243
249static void handle_accept( const int64 serversocket ) { 244static void handle_accept( const int64 serversocket ) {