diff src/http/ngx_http.c @ 176:c0552e5ab567

nginx-0.0.1-2003-11-09-23:03:38 import; separate building
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Nov 2003 20:03:38 +0000
parents ef8c87afcfc5
children 4db54fdbcbe7
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -123,7 +123,6 @@ static char *ngx_http_block(ngx_conf_t *
         }
     }
 
-
     /* parse inside the http{} block */
 
     pcf = *cf;
@@ -131,14 +130,16 @@ static char *ngx_http_block(ngx_conf_t *
     cf->module_type = NGX_HTTP_MODULE;
     cf->cmd_type = NGX_HTTP_MAIN_CONF;
     rv = ngx_conf_parse(cf, NULL);
-    *cf = pcf;
 
-    if (rv != NGX_CONF_OK)
+    if (rv != NGX_CONF_OK) {
+        *cf = pcf;
         return rv;
-
+    }
 
-    /* init http{} main_conf's, merge the server{}s' srv_conf's
-       and its location{}s' loc_conf's */
+    /*
+     * init http{} main_conf's, merge the server{}s' srv_conf's
+     * and its location{}s' loc_conf's
+     */
 
     cmcf = ctx->main_conf[ngx_http_core_module.ctx_index];
     cscfp = cmcf->servers.elts;
@@ -556,5 +557,6 @@ ngx_log_debug(cf->log, "%s %08x" _ s_nam
     }
     /**/
 
+    *cf = pcf;
     return NGX_CONF_OK;
 }