mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_lua: Pass on the request_rec to ap_lua_get_lua_state, so we can use it for allocating memory for the cache info lookup.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -338,7 +338,7 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec
|
||||
* server in the appropriate scope.
|
||||
*/
|
||||
AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
|
||||
ap_lua_vm_spec *spec)
|
||||
ap_lua_vm_spec *spec, request_rec* r)
|
||||
{
|
||||
lua_State *L = NULL;
|
||||
int tryCache = 0;
|
||||
@@ -365,7 +365,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
|
||||
}
|
||||
else {
|
||||
ap_lua_finfo *cache_info;
|
||||
char* mkey = apr_psprintf(lifecycle_pool, "ap_lua_modified:%s", spec->file); /* XXX: Change to a different pool? */
|
||||
char* mkey = apr_psprintf(r->pool, "ap_lua_modified:%s", spec->file);
|
||||
if (apr_pool_userdata_get((void **)&cache_info, mkey,
|
||||
lifecycle_pool) == APR_SUCCESS) {
|
||||
if (cache_info == NULL) {
|
||||
|
Reference in New Issue
Block a user