comparison src/event/ngx_event_pipe.c @ 294:5cfd65b8b0a7

nginx-0.0.3-2004-03-23-09:01:52 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 23 Mar 2004 06:01:52 +0000
parents ec3c049681fd
children bcbe876f4262
comparison
equal deleted inserted replaced
293:ec3c049681fd 294:5cfd65b8b0a7
375 */ 375 */
376 376
377 bsize = 0; 377 bsize = 0;
378 to_write = 0; 378 to_write = 0;
379 379
380 #if 0
380 if (!(p->upstream_eof || p->upstream_error || p->upstream_done)) { 381 if (!(p->upstream_eof || p->upstream_error || p->upstream_done)) {
382 #endif
381 for (cl = p->busy; cl; cl = cl->next) { 383 for (cl = p->busy; cl; cl = cl->next) {
382 bsize += cl->hunk->end - cl->hunk->start; 384 bsize += cl->hunk->end - cl->hunk->start;
383 to_write += ngx_hunk_size(cl->hunk); 385 to_write += ngx_hunk_size(cl->hunk);
384 } 386 }
385 } 387 #if 0
388 }
389 #endif
386 390
387 out = NULL; 391 out = NULL;
388 ll = NULL; 392 ll = NULL;
389 393
390 for ( ;; ) { 394 for ( ;; ) {
391 if (p->out) { 395 if (p->out) {
392 cl = p->out; 396 cl = p->out;
393 397
398 #if 0
394 if (!(p->upstream_eof || p->upstream_error || p->upstream_done) 399 if (!(p->upstream_eof || p->upstream_error || p->upstream_done)
395 && (bsize + ngx_hunk_size(cl->hunk) > p->busy_size)) 400 && (bsize + ngx_hunk_size(cl->hunk) > p->busy_size))
396 { 401 {
397 break; 402 break;
398 } 403 }
404 #else
405 if (bsize + ngx_hunk_size(cl->hunk) > p->busy_size) {
406 break;
407 }
408 #endif
399 409
400 p->out = p->out->next; 410 p->out = p->out->next;
401 ngx_event_pipe_free_shadow_raw_hunk(&p->free_raw_hunks, 411 ngx_event_pipe_free_shadow_raw_hunk(&p->free_raw_hunks,
402 cl->hunk); 412 cl->hunk);
403 413
404 } else if (!p->cachable && p->in) { 414 } else if (!p->cachable && p->in) {
405 cl = p->in; 415 cl = p->in;
406 416
417 #if 0
407 if (!(p->upstream_eof || p->upstream_error || p->upstream_done) 418 if (!(p->upstream_eof || p->upstream_error || p->upstream_done)
408 && (bsize + ngx_hunk_size(cl->hunk) > p->busy_size)) 419 && (bsize + ngx_hunk_size(cl->hunk) > p->busy_size))
409 { 420 {
410 break; 421 break;
411 } 422 }
423 #else
424 if (bsize + ngx_hunk_size(cl->hunk) > p->busy_size) {
425 break;
426 }
427 #endif
412 428
413 p->in = p->in->next; 429 p->in = p->in->next;
414 430
415 } else { 431 } else {
416 break; 432 break;