From 00e0b2ed3ec186cb031ffe9317b5e38a7d59e158 Mon Sep 17 00:00:00 2001 From: xiaokai Date: Sat, 9 Jan 2016 13:46:49 +0800 Subject: [PATCH] update upsync_dump_path default --- README.md | 2 +- src/ngx_http_upsync_module.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b99058e..ff391a3 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ upsync_dump_path ----------- `syntax: upsync_dump_path $path` -default: /usr/local/nginx/conf/upstreams/upstream_$host.conf +default: /tmp/servers_$host.conf context: upstream diff --git a/src/ngx_http_upsync_module.c b/src/ngx_http_upsync_module.c index 9aa6e17..1ecd558 100644 --- a/src/ngx_http_upsync_module.c +++ b/src/ngx_http_upsync_module.c @@ -1572,11 +1572,11 @@ ngx_http_upsync_init_srv_conf(ngx_conf_t *cf, void *conf, ngx_uint_t num) if (upscf->upsync_dump_path.len == NGX_CONF_UNSET_SIZE) { buf = ngx_pcalloc(cf->pool, - ngx_strlen("/tmp/upstream_.conf") + uscf->host.len + 1); - ngx_sprintf(buf, "/tmp/upstream_%V.conf", &uscf->host); + ngx_strlen("/tmp/servers_.conf") + uscf->host.len + 1); + ngx_sprintf(buf, "/tmp/servers_%V.conf", &uscf->host); upscf->upsync_dump_path.data = buf; - upscf->upsync_dump_path.len = ngx_strlen("/tmp/upstream_.conf") + upscf->upsync_dump_path.len = ngx_strlen("/tmp/servers_.conf") + uscf->host.len; }