{
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) {
/* 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;
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;
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;
}
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,
* 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; /* <wombat_hook_info> */