changeset 1122:3728476ab96d

stop on superfluous closing "}"
author Igor Sysoev <igor@sysoev.ru>
date Tue, 20 Feb 2007 14:33:26 +0000
parents b3c492eb086f
children 88dc269bbca2
files src/core/ngx_conf_file.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c	Mon Feb 19 13:42:48 2007 +0000
+++ b/src/core/ngx_conf_file.c	Tue Feb 20 14:33:26 2007 +0000
@@ -145,6 +145,12 @@
         }
 
         if (rc == NGX_CONF_BLOCK_DONE) {
+            if (!block) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
+                rc = NGX_ERROR;
+                break;
+            }
+
             block = 0;
         }