comparison src/mail/ngx_mail_core_module.c @ 486:6484cbba0222 NGINX_0_7_55

nginx 0.7.55 *) Bugfix: the http_XXX parameters in "proxy_cache_use_stale" and "fastcgi_cache_use_stale" directives did not work. *) Bugfix: fastcgi cache did not cache header only responses. *) Bugfix: of "select() failed (9: Bad file descriptor)" error in nginx/Unix and "select() failed (10022: ...)" error in nginx/Windows. *) Bugfix: a segmentation fault might occur in worker process, if an "debug_connection" directive was used; the bug had appeared in 0.7.54. *) Bugfix: fix ngx_http_image_filter_module building errors. *) Bugfix: the files bigger than 2G could not be transferred using $r->sendfile. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Wed, 06 May 2009 00:00:00 +0400
parents 76a79816b771
children 98143f74eb3d
comparison
equal deleted inserted replaced
485:21824e8058e6 486:6484cbba0222
282 ngx_mail_core_srv_conf_t *cscf = conf; 282 ngx_mail_core_srv_conf_t *cscf = conf;
283 283
284 ngx_str_t *value; 284 ngx_str_t *value;
285 ngx_url_t u; 285 ngx_url_t u;
286 ngx_uint_t i, m; 286 ngx_uint_t i, m;
287 ngx_mail_listen_t *imls; 287 ngx_mail_listen_t *ls;
288 ngx_mail_module_t *module; 288 ngx_mail_module_t *module;
289 ngx_mail_core_main_conf_t *cmcf; 289 ngx_mail_core_main_conf_t *cmcf;
290 290
291 value = cf->args->elts; 291 value = cf->args->elts;
292 292
310 return NGX_CONF_ERROR; 310 return NGX_CONF_ERROR;
311 } 311 }
312 312
313 cmcf = ngx_mail_conf_get_module_main_conf(cf, ngx_mail_core_module); 313 cmcf = ngx_mail_conf_get_module_main_conf(cf, ngx_mail_core_module);
314 314
315 imls = cmcf->listen.elts; 315 ls = cmcf->listen.elts;
316 316
317 for (i = 0; i < cmcf->listen.nelts; i++) { 317 for (i = 0; i < cmcf->listen.nelts; i++) {
318 318
319 if (imls[i].addr != u.addr.in_addr || imls[i].port != u.port) { 319 if (ls[i].addr != u.addr.in_addr || ls[i].port != u.port) {
320 continue; 320 continue;
321 } 321 }
322 322
323 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 323 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
324 "duplicate \"%V\" address and port pair", &u.url); 324 "duplicate \"%V\" address and port pair", &u.url);
325 return NGX_CONF_ERROR; 325 return NGX_CONF_ERROR;
326 } 326 }
327 327
328 imls = ngx_array_push(&cmcf->listen); 328 ls = ngx_array_push(&cmcf->listen);
329 if (imls == NULL) { 329 if (ls == NULL) {
330 return NGX_CONF_ERROR; 330 return NGX_CONF_ERROR;
331 } 331 }
332 332
333 ngx_memzero(imls, sizeof(ngx_mail_listen_t)); 333 ngx_memzero(ls, sizeof(ngx_mail_listen_t));
334 334
335 imls->addr = u.addr.in_addr; 335 ls->addr = u.addr.in_addr;
336 imls->port = u.port; 336 ls->port = u.port;
337 imls->family = u.family; 337 ls->family = u.family;
338 imls->ctx = cf->ctx; 338 ls->ctx = cf->ctx;
339 339
340 for (m = 0; ngx_modules[m]; m++) { 340 for (m = 0; ngx_modules[m]; m++) {
341 if (ngx_modules[m]->type != NGX_MAIL_MODULE) { 341 if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
342 continue; 342 continue;
343 } 343 }
357 } 357 }
358 358
359 for (i = 2; i < cf->args->nelts; i++) { 359 for (i = 2; i < cf->args->nelts; i++) {
360 360
361 if (ngx_strcmp(value[i].data, "bind") == 0) { 361 if (ngx_strcmp(value[i].data, "bind") == 0) {
362 imls->bind = 1; 362 ls->bind = 1;
363 continue; 363 continue;
364 } 364 }
365 365
366 if (ngx_strcmp(value[i].data, "ssl") == 0) { 366 if (ngx_strcmp(value[i].data, "ssl") == 0) {
367 #if (NGX_MAIL_SSL) 367 #if (NGX_MAIL_SSL)
368 imls->ssl = 1; 368 ls->ssl = 1;
369 continue; 369 continue;
370 #else 370 #else
371 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 371 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
372 "the \"ssl\" parameter requires " 372 "the \"ssl\" parameter requires "
373 "ngx_mail_ssl_module"); 373 "ngx_mail_ssl_module");