From 1278d68ae74887d6f737d35763430b85df33adae Mon Sep 17 00:00:00 2001 From: Brian McCallister Date: Thu, 10 Nov 2011 23:54:00 +0000 Subject: [PATCH] remove ability to set min and max pool sizes for server scope in prep for removing server scope git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200639 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_vmprep.c | 31 ------------------------------- modules/lua/lua_vmprep.h | 2 -- modules/lua/mod_lua.c | 8 -------- modules/lua/mod_lua.h | 2 -- 4 files changed, 43 deletions(-) diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c index 22c960e748..8e38decebd 100644 --- a/modules/lua/lua_vmprep.c +++ b/modules/lua/lua_vmprep.c @@ -427,37 +427,6 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool, { lua_State *L = NULL; - /* - if (spec->scope == AP_LUA_SCOPE_SERVER) { - apr_reslist_t *reslist; - - if (apr_pool_userdata_get((void **)&reslist, - "mod_lua", spec->pool) == APR_SUCCESS) { - if(reslist==NULL) { - if(apr_reslist_create(&reslist, - spec->vm_server_pool_min, - spec->vm_server_pool_max, - spec->vm_server_pool_max, - 0, - vm_construct, - vm_destruct, - spec, - spec->pool) != APR_SUCCESS) - return NULL; - - apr_pool_userdata_set(reslist, - "mod_lua", - vm_reslist_destroy, - spec->pool); - } - apr_reslist_acquire(reslist, (void **)&L); - lua_pushlightuserdata(L, L); - lua_pushlightuserdata(L, reslist); - lua_rawset(L,LUA_REGISTRYINDEX); - apr_pool_userdata_set(L, spec->file, vm_release, lifecycle_pool); - } - } else { - */ if (apr_pool_userdata_get((void **)&L, spec->file, lifecycle_pool) == APR_SUCCESS) { diff --git a/modules/lua/lua_vmprep.h b/modules/lua/lua_vmprep.h index 3db2921b8f..b3cbd2b778 100644 --- a/modules/lua/lua_vmprep.h +++ b/modules/lua/lua_vmprep.h @@ -57,8 +57,6 @@ typedef struct /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER */ int scope; - unsigned int vm_server_pool_min; - unsigned int vm_server_pool_max; ap_lua_state_open_callback cb; void* cb_arg; diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index e67d9d2403..04cd363de7 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -104,8 +104,6 @@ static int lua_handler(request_rec *r) spec->file = r->filename; spec->package_paths = cfg->package_paths; spec->package_cpaths = cfg->package_cpaths; - spec->vm_server_pool_min = cfg->vm_server_pool_min; - spec->vm_server_pool_max = cfg->vm_server_pool_max; spec->cb = &lua_open_callback; spec->cb_arg = NULL; @@ -172,8 +170,6 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap spec->file = hook_spec->file_name; spec->scope = hook_spec->scope; - spec->vm_server_pool_min = cfg->vm_server_pool_min; - spec->vm_server_pool_max = cfg->vm_server_pool_max; spec->bytecode = hook_spec->bytecode; spec->bytecode_len = hook_spec->bytecode_len; spec->pool = spec->scope==AP_LUA_SCOPE_SERVER ? cfg->pool : r->pool; @@ -842,10 +838,6 @@ static const char *register_lua_scope(cmd_parms *cmd, } else if (strcmp("server", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_SERVER; - if (min) - cfg->vm_server_pool_min = atoi(min); - if (max) - cfg->vm_server_pool_max = atoi(max); } else { return apr_psprintf(cmd->pool, diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h index 80b095a79a..82a0e4ffcb 100644 --- a/modules/lua/mod_lua.h +++ b/modules/lua/mod_lua.h @@ -97,8 +97,6 @@ typedef struct * AP_LUA_SCOPE_ONCE | AP_LUA_SCOPE_REQUEST | AP_LUA_SCOPE_CONN | AP_LUA_SCOPE_SERVER */ unsigned int vm_scope; - unsigned int vm_server_pool_min; - unsigned int vm_server_pool_max; /* info for the hook harnesses */ apr_hash_t *hooks; /* */ -- 2.40.0