Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 3237:2efa8d2fcde1 stable-0.7
merge r2903, r2911, r2912, r3002:
fix various failures handling
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 26 Oct 2009 15:54:29 +0000 |
parents | 9aa8fd2d5a00 |
children | ff7e1ec2c9a4 |
comparison
equal
deleted
inserted
replaced
3236:9aa8fd2d5a00 | 3237:2efa8d2fcde1 |
---|---|
2697 { | 2697 { |
2698 ngx_http_core_main_conf_t *cmcf; | 2698 ngx_http_core_main_conf_t *cmcf; |
2699 | 2699 |
2700 cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t)); | 2700 cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t)); |
2701 if (cmcf == NULL) { | 2701 if (cmcf == NULL) { |
2702 return NGX_CONF_ERROR; | 2702 return NULL; |
2703 } | 2703 } |
2704 | 2704 |
2705 if (ngx_array_init(&cmcf->servers, cf->pool, 4, | 2705 if (ngx_array_init(&cmcf->servers, cf->pool, 4, |
2706 sizeof(ngx_http_core_srv_conf_t *)) | 2706 sizeof(ngx_http_core_srv_conf_t *)) |
2707 != NGX_OK) | 2707 != NGX_OK) |
2708 { | 2708 { |
2709 return NGX_CONF_ERROR; | 2709 return NULL; |
2710 } | 2710 } |
2711 | 2711 |
2712 cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT; | 2712 cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT; |
2713 cmcf->server_names_hash_bucket_size = NGX_CONF_UNSET_UINT; | 2713 cmcf->server_names_hash_bucket_size = NGX_CONF_UNSET_UINT; |
2714 | 2714 |
2756 { | 2756 { |
2757 ngx_http_core_srv_conf_t *cscf; | 2757 ngx_http_core_srv_conf_t *cscf; |
2758 | 2758 |
2759 cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t)); | 2759 cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t)); |
2760 if (cscf == NULL) { | 2760 if (cscf == NULL) { |
2761 return NGX_CONF_ERROR; | 2761 return NULL; |
2762 } | 2762 } |
2763 | 2763 |
2764 /* | 2764 /* |
2765 * set by ngx_pcalloc(): | 2765 * set by ngx_pcalloc(): |
2766 * | 2766 * |
2769 | 2769 |
2770 if (ngx_array_init(&cscf->listen, cf->temp_pool, 4, | 2770 if (ngx_array_init(&cscf->listen, cf->temp_pool, 4, |
2771 sizeof(ngx_http_listen_t)) | 2771 sizeof(ngx_http_listen_t)) |
2772 != NGX_OK) | 2772 != NGX_OK) |
2773 { | 2773 { |
2774 return NGX_CONF_ERROR; | 2774 return NULL; |
2775 } | 2775 } |
2776 | 2776 |
2777 if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4, | 2777 if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4, |
2778 sizeof(ngx_http_server_name_t)) | 2778 sizeof(ngx_http_server_name_t)) |
2779 != NGX_OK) | 2779 != NGX_OK) |
2780 { | 2780 { |
2781 return NGX_CONF_ERROR; | 2781 return NULL; |
2782 } | 2782 } |
2783 | 2783 |
2784 cscf->connection_pool_size = NGX_CONF_UNSET_SIZE; | 2784 cscf->connection_pool_size = NGX_CONF_UNSET_SIZE; |
2785 cscf->request_pool_size = NGX_CONF_UNSET_SIZE; | 2785 cscf->request_pool_size = NGX_CONF_UNSET_SIZE; |
2786 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC; | 2786 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC; |
2887 { | 2887 { |
2888 ngx_http_core_loc_conf_t *lcf; | 2888 ngx_http_core_loc_conf_t *lcf; |
2889 | 2889 |
2890 lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t)); | 2890 lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t)); |
2891 if (lcf == NULL) { | 2891 if (lcf == NULL) { |
2892 return NGX_CONF_ERROR; | 2892 return NULL; |
2893 } | 2893 } |
2894 | 2894 |
2895 /* | 2895 /* |
2896 * set by ngx_pcalloc(): | 2896 * set by ngx_pcalloc(): |
2897 * | 2897 * |