Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Update ngx_http_dyups_module.c #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions ngx_http_dyups_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ ngx_http_dyups_init(ngx_conf_t *cf)
static ngx_int_t
ngx_http_dyups_init_process(ngx_cycle_t *cycle)
{
ngx_core_conf_t *ccf;
//ngx_core_conf_t *ccf;
ngx_slab_pool_t *shpool;
ngx_dyups_shctx_t *sh;
//ngx_dyups_shctx_t *sh;
ngx_http_dyups_main_conf_t *dmcf;

ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
//ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);

dmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle,
ngx_http_dyups_module);
Expand All @@ -509,7 +509,7 @@ ngx_http_dyups_init_process(ngx_cycle_t *cycle)
ngx_http_dyups_api_enable = 1;

shpool = ngx_dyups_global_ctx.shpool;
sh = ngx_dyups_global_ctx.sh;
//sh = ngx_dyups_global_ctx.sh;

ngx_shmtx_lock(&shpool->mutex);

Expand Down Expand Up @@ -573,10 +573,10 @@ ngx_dyups_delete_upstream(ngx_str_t *name, ngx_str_t *rv)
{
ngx_int_t status, rc;
ngx_slab_pool_t *shpool;
ngx_http_dyups_main_conf_t *dmcf;
//ngx_http_dyups_main_conf_t *dmcf;

dmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle,
ngx_http_dyups_module);
//dmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle,
// ngx_http_dyups_module);
shpool = ngx_dyups_global_ctx.shpool;

if (!ngx_http_dyups_api_enable) {
Expand Down Expand Up @@ -676,13 +676,13 @@ ngx_http_dyups_reload()
ngx_buf_t body;
ngx_int_t rc;
ngx_str_t rv;
ngx_slab_pool_t *shpool;
//ngx_slab_pool_t *shpool;
ngx_dyups_shctx_t *sh;
ngx_rbtree_node_t *node, *root, *sentinel;
ngx_dyups_upstream_t *ups;

sh = ngx_dyups_global_ctx.sh;
shpool = ngx_dyups_global_ctx.shpool;
//shpool = ngx_dyups_global_ctx.shpool;
sentinel = sh->rbtree.sentinel;
root = sh->rbtree.root;

Expand Down Expand Up @@ -955,10 +955,10 @@ ngx_dyups_update_upstream(ngx_str_t *name, ngx_buf_t *buf, ngx_str_t *rv)
{
ngx_int_t status;
ngx_slab_pool_t *shpool;
ngx_http_dyups_main_conf_t *dmcf;
//ngx_http_dyups_main_conf_t *dmcf;

dmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle,
ngx_http_dyups_module);
//dmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle,
// ngx_http_dyups_module);
shpool = ngx_dyups_global_ctx.shpool;

if (!ngx_http_dyups_api_enable) {
Expand Down