]> git.kaiwu.me - nginx.git/commitdiff
test the second binary geo range base existence
authorIgor Sysoev <igor@sysoev.ru>
Wed, 30 Jun 2010 10:12:46 +0000 (10:12 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 30 Jun 2010 10:12:46 +0000 (10:12 +0000)
src/http/modules/ngx_http_geo_module.c

index efa69b3a5ce1c7ef60d24aebd6f6b3c6a74c29dd..0b511359c773a12c2744e31e38a9c8f1afff3130 100644 (file)
@@ -1176,6 +1176,14 @@ ngx_http_geo_include_binary_base(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
         goto done;
     }
 
+    if (ctx->binary_include) {
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+            "second binary geo range base \"%s\" may not be mixed with \"%s\"",
+            name->data, ctx->include_name.data);
+        rc = NGX_ERROR;
+        goto done;
+    }
+
     if (ngx_fd_info(file.fd, &fi) == NGX_FILE_ERROR) {
         ngx_conf_log_error(NGX_LOG_CRIT, cf, ngx_errno,
                            ngx_fd_info_n " \"%s\" failed", name->data);