mod_lua give me chance to hook with lua_open and lua_request,
APR_OPTIONAL_HOOK(ap_lua, lua_open, lua_open_hook, NULL, NULL,
APR_HOOK_REALLY_FIRST);
but never call ap_lua_run_lua_open to run lua_open hooks,
Here is patch, please author of mod_lua take care of it.
--------------------------------------------------------------------------------------
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_open,
(lua_State *L, apr_pool_t *p),
(L, p), OK, DECLINED)
@@ -119,11 +114,11 @@ static void lua_open_callback(lua_State *L,
apr_pool_t *p, void *ctx)
ap_lua_load_apache2_lmodule(L);
ap_lua_load_request_lmodule(L, p);
ap_lua_load_config_lmodule(L);
+ ap_lua_run_lua_open(L, p);
}
static int lua_open_hook(lua_State *L, apr_pool_t *p)
{
- lua_open_callback(L, p, NULL);
return OK;
}