comparison src/http/modules/ngx_http_geo_module.c @ 328:390b8f8309d6 NGINX_0_6_8

nginx 0.6.8 *) Change: now nginx tries to set the "worker_priority", "worker_rlimit_nofile", "worker_rlimit_core", and "worker_rlimit_sigpending" without super-user privileges. *) Change: now nginx escapes space and "%" in request to a mail proxy authentication server. *) Change: now nginx escapes "%" in $memcached_key variable. *) Bugfix: nginx used path relative to configuration prefix for non-absolute configuration file path specified in the "-c" key; bug appeared in 0.6.6. *) Bugfix: nginx did not work on FreeBSD/sparc64.
author Igor Sysoev <http://sysoev.ru>
date Mon, 20 Aug 2007 00:00:00 +0400
parents 9fc4ab6673f9
children 10cc350ed8a1
comparison
equal deleted inserted replaced
327:be18d26e067c 328:390b8f8309d6
84 ngx_radix32tree_find(tree, ntohl(sin->sin_addr.s_addr)); 84 ngx_radix32tree_find(tree, ntohl(sin->sin_addr.s_addr));
85 85
86 *v = *vv; 86 *v = *vv;
87 87
88 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 88 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
89 "http geo: %V %V", &r->connection->addr_text, v); 89 "http geo: %V %v", &r->connection->addr_text, v);
90 90
91 return NGX_OK; 91 return NGX_OK;
92 } 92 }
93 93
94 94
98 char *rv; 98 char *rv;
99 ngx_str_t *value, name; 99 ngx_str_t *value, name;
100 ngx_conf_t save; 100 ngx_conf_t save;
101 ngx_pool_t *pool; 101 ngx_pool_t *pool;
102 ngx_radix_tree_t *tree; 102 ngx_radix_tree_t *tree;
103 ngx_http_variable_t *var;
103 ngx_http_geo_conf_ctx_t ctx; 104 ngx_http_geo_conf_ctx_t ctx;
104 ngx_http_variable_t *var;
105 105
106 value = cf->args->elts; 106 value = cf->args->elts;
107 107
108 name = value[1]; 108 name = value[1];
109 109
283 283
284 old = (ngx_http_variable_value_t *) 284 old = (ngx_http_variable_value_t *)
285 ngx_radix32tree_find(ctx->tree, cidrin.addr & cidrin.mask); 285 ngx_radix32tree_find(ctx->tree, cidrin.addr & cidrin.mask);
286 286
287 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 287 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
288 "duplicate parameter \"%V\", value: \"%V\", " 288 "duplicate parameter \"%V\", value: \"%v\", old value: \"%v\"",
289 "old value: \"%V\"", 289 &value[0], var, old);
290 &value[0], var, old);
291 290
292 rc = ngx_radix32tree_delete(ctx->tree, cidrin.addr, cidrin.mask); 291 rc = ngx_radix32tree_delete(ctx->tree, cidrin.addr, cidrin.mask);
293 292
294 if (rc == NGX_ERROR) { 293 if (rc == NGX_ERROR) {
295 return NGX_CONF_ERROR; 294 return NGX_CONF_ERROR;