diff --git a/src/ngx_stream_lua_shdict.c b/src/ngx_stream_lua_shdict.c index 7be2c360..3c7d040f 100644 --- a/src/ngx_stream_lua_shdict.c +++ b/src/ngx_stream_lua_shdict.c @@ -307,7 +307,8 @@ ngx_stream_lua_shdict_expire(ngx_stream_lua_shdict_ctx_t *ctx, ngx_uint_t n) void -ngx_stream_lua_inject_shdict_api(ngx_stream_lua_main_conf_t *lmcf, lua_State *L) +ngx_stream_lua_inject_shdict_api(ngx_log_t *log, + ngx_stream_lua_main_conf_t *lmcf, lua_State *L) { ngx_uint_t i; ngx_array_t all_zones; @@ -315,9 +316,6 @@ ngx_stream_lua_inject_shdict_api(ngx_stream_lua_main_conf_t *lmcf, lua_State *L) ngx_shm_zone_t **zone, *shm_zone; ngx_pool_t *temp_pool; ngx_list_part_t *part; - ngx_log_t *log; - - log = &lmcf->cycle->log; /* place http and stream zones in a single array */ temp_pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, log); diff --git a/src/ngx_stream_lua_shdict.h b/src/ngx_stream_lua_shdict.h index 83ee421d..42160978 100644 --- a/src/ngx_stream_lua_shdict.h +++ b/src/ngx_stream_lua_shdict.h @@ -44,8 +44,8 @@ typedef struct { ngx_int_t ngx_stream_lua_shdict_init_zone(ngx_shm_zone_t *shm_zone, void *data); void ngx_stream_lua_shdict_rbtree_insert_value(ngx_rbtree_node_t *temp, ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel); -void ngx_stream_lua_inject_shdict_api(ngx_stream_lua_main_conf_t *lmcf, - lua_State *L); +void ngx_stream_lua_inject_shdict_api(ngx_log_t *log, + ngx_stream_lua_main_conf_t *lmcf, lua_State *L); #endif /* _NGX_STREAM_LUA_SHDICT_H_INCLUDED_ */ diff --git a/src/ngx_stream_lua_util.c b/src/ngx_stream_lua_util.c index ae407237..6716aa28 100644 --- a/src/ngx_stream_lua_util.c +++ b/src/ngx_stream_lua_util.c @@ -2674,7 +2674,7 @@ ngx_stream_lua_inject_ngx_api(lua_State *L, ngx_stream_lua_main_conf_t *lmcf, ngx_stream_lua_inject_req_api(log, L); ngx_stream_lua_inject_variable_api(L); - ngx_stream_lua_inject_shdict_api(lmcf, L); + ngx_stream_lua_inject_shdict_api(log, lmcf, L); ngx_stream_lua_inject_socket_tcp_api(log, L); ngx_stream_lua_inject_socket_udp_api(log, L); ngx_stream_lua_inject_uthread_api(log, L);