comparison src/core/ngx_conf_file.c @ 4856:43b7b9572fe1 stable-1.2

Merge of r4828: "include" with wildcards in map and types blocks. The "include" directive should be able to include multiple files if given a filename mask. Fixed this to work for "include" directives inside the "map" or "types" blocks. The "include" directive inside the "geo" block is still not fixed.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 24 Sep 2012 19:05:02 +0000
parents 92a620dd8036
children c821975c9068
comparison
equal deleted inserted replaced
4855:f66d0a6d7fdd 4856:43b7b9572fe1
10 10
11 #define NGX_CONF_BUFFER 4096 11 #define NGX_CONF_BUFFER 4096
12 12
13 static ngx_int_t ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last); 13 static ngx_int_t ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last);
14 static ngx_int_t ngx_conf_read_token(ngx_conf_t *cf); 14 static ngx_int_t ngx_conf_read_token(ngx_conf_t *cf);
15 static char *ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
16 static ngx_int_t ngx_conf_test_full_name(ngx_str_t *name); 15 static ngx_int_t ngx_conf_test_full_name(ngx_str_t *name);
17 static void ngx_conf_flush_files(ngx_cycle_t *cycle); 16 static void ngx_conf_flush_files(ngx_cycle_t *cycle);
18 17
19 18
20 static ngx_command_t ngx_conf_commands[] = { 19 static ngx_command_t ngx_conf_commands[] = {
729 } 728 }
730 } 729 }
731 } 730 }
732 731
733 732
734 static char * 733 char *
735 ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) 734 ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
736 { 735 {
737 char *rv; 736 char *rv;
738 ngx_int_t n; 737 ngx_int_t n;
739 ngx_str_t *value, file, name; 738 ngx_str_t *value, file, name;