comparison src/event/ngx_event.c @ 249:2a0540287298

nginx-0.0.2-2004-02-03-19:43:54 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 03 Feb 2004 16:43:54 +0000
parents e885208c518b
children 1903c6821958
comparison
equal deleted inserted replaced
248:e885208c518b 249:2a0540287298
14 #include <ngx_kqueue_module.h> 14 #include <ngx_kqueue_module.h>
15 #endif 15 #endif
16 16
17 #if (HAVE_DEVPOLL) 17 #if (HAVE_DEVPOLL)
18 extern ngx_module_t ngx_devpoll_module; 18 extern ngx_module_t ngx_devpoll_module;
19 extern ngx_event_module_t ngx_devpoll_module_ctx;
19 #endif 20 #endif
20 21
21 #if (HAVE_AIO) 22 #if (HAVE_AIO)
22 #include <ngx_aio_module.h> 23 #include <ngx_aio_module.h>
23 #endif 24 #endif
384 ngx_event_core_module); 385 ngx_event_core_module);
385 } else { 386 } else {
386 old_ecf = NULL; 387 old_ecf = NULL;
387 } 388 }
388 389
390
389 for (m = 0; ngx_modules[m]; m++) { 391 for (m = 0; ngx_modules[m]; m++) {
390 if (ngx_modules[m]->type != NGX_EVENT_MODULE) { 392 if (ngx_modules[m]->type != NGX_EVENT_MODULE) {
391 continue; 393 continue;
392 } 394 }
393 395
395 if (module->name->len == value[1].len) { 397 if (module->name->len == value[1].len) {
396 if (ngx_strcmp(module->name->data, value[1].data) == 0) { 398 if (ngx_strcmp(module->name->data, value[1].data) == 0) {
397 ecf->use = ngx_modules[m]->ctx_index; 399 ecf->use = ngx_modules[m]->ctx_index;
398 ecf->name = module->name->data; 400 ecf->name = module->name->data;
399 401
400 if (old_ecf && old_ecf->use != ecf->use) { 402 if (ngx_process == NGX_PROCESS_SINGLE
403 && old_ecf
404 && old_ecf->use != ecf->use)
405 {
401 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 406 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
407 "when the server runs without a master process "
402 "the \"%s\" event type must be the same as " 408 "the \"%s\" event type must be the same as "
403 "in previous configuration - \"%s\" " 409 "in previous configuration - \"%s\" "
404 "and it can not be changed on the fly, " 410 "and it can not be changed on the fly, "
405 "to change it you need to stop server " 411 "to change it you need to stop server "
406 "and start it again", 412 "and start it again",
407 value[1].data, old_ecf->name); 413 value[1].data, old_ecf->name);
414
408 return NGX_CONF_ERROR; 415 return NGX_CONF_ERROR;
409 } 416 }
410 417
411 return NGX_CONF_OK; 418 return NGX_CONF_OK;
412 } 419 }