comparison src/http/modules/ngx_http_log_module.c @ 496:f39b9e29530d NGINX_0_8_0

nginx 0.8.0 *) Feature: the "keepalive_requests" directive. *) Feature: the "limit_rate_after" directive. Thanks to Ivan Debnar. *) Bugfix: XLST filter did not work in subrequests. *) Bugfix: in relative paths handling in nginx/Windows. *) Bugfix: in proxy_store, fastcgi_store, proxy_cache, and fastcgi_cache in nginx/Windows. *) Bugfix: in memory allocation error handling. Thanks to Maxim Dounin and Kirill A. Korinskiy.
author Igor Sysoev <http://sysoev.ru>
date Tue, 02 Jun 2009 00:00:00 +0400
parents 392c16f2d858
children 7efcdb937752
comparison
equal deleted inserted replaced
495:6d9fb4461113 496:f39b9e29530d
712 712
713 ngx_http_log_fmt_t *fmt; 713 ngx_http_log_fmt_t *fmt;
714 714
715 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t)); 715 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t));
716 if (conf == NULL) { 716 if (conf == NULL) {
717 return NGX_CONF_ERROR; 717 return NULL;
718 } 718 }
719 719
720 if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t)) 720 if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t))
721 != NGX_OK) 721 != NGX_OK)
722 { 722 {
723 return NGX_CONF_ERROR; 723 return NULL;
724 } 724 }
725 725
726 fmt = ngx_array_push(&conf->formats); 726 fmt = ngx_array_push(&conf->formats);
727 if (fmt == NULL) { 727 if (fmt == NULL) {
728 return NGX_CONF_ERROR; 728 return NULL;
729 } 729 }
730 730
731 fmt->name.len = sizeof("combined") - 1; 731 fmt->name.len = sizeof("combined") - 1;
732 fmt->name.data = (u_char *) "combined"; 732 fmt->name.data = (u_char *) "combined";
733 733
734 fmt->flushes = NULL; 734 fmt->flushes = NULL;
735 735
736 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t)); 736 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
737 if (fmt->ops == NULL) { 737 if (fmt->ops == NULL) {
738 return NGX_CONF_ERROR; 738 return NULL;
739 } 739 }
740 740
741 return conf; 741 return conf;
742 } 742 }
743 743
747 { 747 {
748 ngx_http_log_loc_conf_t *conf; 748 ngx_http_log_loc_conf_t *conf;
749 749
750 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t)); 750 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t));
751 if (conf == NULL) { 751 if (conf == NULL) {
752 return NGX_CONF_ERROR; 752 return NULL;
753 } 753 }
754 754
755 conf->open_file_cache = NGX_CONF_UNSET_PTR; 755 conf->open_file_cache = NGX_CONF_UNSET_PTR;
756 756
757 return conf; 757 return conf;