Mercurial > hg > nginx-quic
comparison src/event/ngx_event.c @ 356:2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 16 Jun 2004 15:32:11 +0000 |
parents | 0fb6c53fb135 |
children | 0a03c921c81d |
comparison
equal
deleted
inserted
replaced
355:0fb6c53fb135 | 356:2e3cbc1bbe3c |
---|---|
502 ngx_int_t m; | 502 ngx_int_t m; |
503 ngx_str_t *value; | 503 ngx_str_t *value; |
504 ngx_event_conf_t *old_ecf; | 504 ngx_event_conf_t *old_ecf; |
505 ngx_event_module_t *module; | 505 ngx_event_module_t *module; |
506 | 506 |
507 if (ecf->use != NGX_CONF_UNSET) { | 507 if (ecf->use != NGX_CONF_UNSET_UINT) { |
508 return "is duplicate" ; | 508 return "is duplicate" ; |
509 } | 509 } |
510 | 510 |
511 value = cf->args->elts; | 511 value = cf->args->elts; |
512 | 512 |
631 ngx_event_conf_t *ecf = conf; | 631 ngx_event_conf_t *ecf = conf; |
632 | 632 |
633 #if (HAVE_KQUEUE) | 633 #if (HAVE_KQUEUE) |
634 | 634 |
635 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 635 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
636 ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index); | 636 ngx_conf_init_unsigned_value(ecf->use, ngx_kqueue_module.ctx_index); |
637 ngx_conf_init_ptr_value(ecf->name, ngx_kqueue_module_ctx.name->data); | 637 ngx_conf_init_ptr_value(ecf->name, ngx_kqueue_module_ctx.name->data); |
638 | 638 |
639 #elif (HAVE_DEVPOLL) | 639 #elif (HAVE_DEVPOLL) |
640 | 640 |
641 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 641 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
642 ngx_conf_init_value(ecf->use, ngx_devpoll_module.ctx_index); | 642 ngx_conf_init_unsigned_value(ecf->use, ngx_devpoll_module.ctx_index); |
643 ngx_conf_init_ptr_value(ecf->name, ngx_devpoll_module_ctx.name->data); | 643 ngx_conf_init_ptr_value(ecf->name, ngx_devpoll_module_ctx.name->data); |
644 | 644 |
645 #elif (HAVE_EPOLL) | 645 #elif (HAVE_EPOLL) |
646 | 646 |
647 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 647 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
648 ngx_conf_init_value(ecf->use, ngx_epoll_module.ctx_index); | 648 ngx_conf_init_unsigned_value(ecf->use, ngx_epoll_module.ctx_index); |
649 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); | 649 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); |
650 | 650 |
651 #elif (HAVE_RTSIG) | 651 #elif (HAVE_RTSIG) |
652 | 652 |
653 ngx_core_conf_t *ccf; | 653 ngx_core_conf_t *ccf; |
654 | 654 |
655 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 655 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
656 ngx_conf_init_value(ecf->use, ngx_rtsig_module.ctx_index); | 656 ngx_conf_init_unsigned_value(ecf->use, ngx_rtsig_module.ctx_index); |
657 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); | 657 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); |
658 | 658 |
659 #elif (HAVE_SELECT) | 659 #elif (HAVE_SELECT) |
660 | 660 |
661 #if (WIN32) | 661 #if (WIN32) |
663 #else | 663 #else |
664 ngx_conf_init_unsigned_value(ecf->connections, | 664 ngx_conf_init_unsigned_value(ecf->connections, |
665 FD_SETSIZE < DEFAULT_CONNECTIONS ? FD_SETSIZE : DEFAULT_CONNECTIONS); | 665 FD_SETSIZE < DEFAULT_CONNECTIONS ? FD_SETSIZE : DEFAULT_CONNECTIONS); |
666 #endif | 666 #endif |
667 | 667 |
668 ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index); | 668 ngx_conf_init_unsigned_value(ecf->use, ngx_select_module.ctx_index); |
669 ngx_conf_init_ptr_value(ecf->name, ngx_select_module_ctx.name->data); | 669 ngx_conf_init_ptr_value(ecf->name, ngx_select_module_ctx.name->data); |
670 | 670 |
671 #else | 671 #else |
672 | 672 |
673 ngx_int_t i, m; | 673 ngx_int_t i, m; |
692 if (m == -1) { | 692 if (m == -1) { |
693 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "no events module found"); | 693 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "no events module found"); |
694 return NGX_CONF_ERROR; | 694 return NGX_CONF_ERROR; |
695 } | 695 } |
696 | 696 |
697 ngx_conf_init_value(ecf->connections, DEFAULT_CONNECTIONS); | 697 ngx_conf_unsigned_init_value(ecf->connections, DEFAULT_CONNECTIONS); |
698 | 698 |
699 ngx_conf_init_value(ecf->use, m); | 699 ngx_conf_unsigned_init_value(ecf->use, m); |
700 ngx_conf_init_ptr_value(ecf->name, module->name->data); | 700 ngx_conf_init_ptr_value(ecf->name, module->name->data); |
701 | 701 |
702 #endif | 702 #endif |
703 | 703 |
704 cycle->connection_n = ecf->connections; | 704 cycle->connection_n = ecf->connections; |