comparison src/core/ngx_resolver.c @ 3297:ebc5384479b4

fix segfault in resolver: ngx_resolve_name_done() and ngx_resolve_addr_done() did not delete contexts from a resolver node waiting list.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 09 Nov 2009 17:45:56 +0000
parents f0d596e84634
children 847ab5a32307
comparison
equal deleted inserted replaced
3296:f63865460aa6 3297:ebc5384479b4
462 462
463 if (rn->waiting) { 463 if (rn->waiting) {
464 464
465 ctx->next = rn->waiting; 465 ctx->next = rn->waiting;
466 rn->waiting = ctx; 466 rn->waiting = ctx;
467 ctx->state = NGX_AGAIN;
467 468
468 return NGX_AGAIN; 469 return NGX_AGAIN;
469 } 470 }
470 471
471 ngx_queue_remove(&rn->queue); 472 ngx_queue_remove(&rn->queue);
623 624
624 if (rn->waiting) { 625 if (rn->waiting) {
625 626
626 ctx->next = rn->waiting; 627 ctx->next = rn->waiting;
627 rn->waiting = ctx; 628 rn->waiting = ctx;
629 ctx->state = NGX_AGAIN;
628 630
629 /* unlock addr mutex */ 631 /* unlock addr mutex */
630 632
631 return NGX_OK; 633 return NGX_OK;
632 } 634 }