apr_shm_t *lua_ivm_shm;
char *lua_ivm_shmfile;
-static apr_status_t shm_cleanup_wrapper(void *unused) {
+static apr_status_t shm_cleanup_wrapper(void *unused)
+{
if (lua_ivm_shm) {
return apr_shm_destroy(lua_ivm_shm);
}
}
}
-static void ap_lua_release_state(lua_State* L, ap_lua_vm_spec* spec, request_rec* r) {
+static void ap_lua_release_state(lua_State* L, ap_lua_vm_spec* spec, request_rec* r)
+{
char *hash;
apr_reslist_t* reslist = NULL;
+
if (spec->scope == AP_LUA_SCOPE_SERVER) {
ap_lua_server_spec* sspec = NULL;
lua_settop(L, 0);
/* ------------------- Input/output content filters ------------------- */
-static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_filter_ctx** c) {
+static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_filter_ctx** c)
+{
apr_pool_t *pool;
ap_lua_vm_spec *spec;
int n, rc;
return APR_ENOENT;
}
-static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn) {
+static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn)
+{
request_rec *r = f->r;
int rc;
lua_State *L;
/* While the Lua function is still yielding, pass buckets to the coroutine */
if (!ctx->broken) {
lastCall = 0;
- while(!APR_BRIGADE_EMPTY(ctx->tmpBucket)) {
+ while (!APR_BRIGADE_EMPTY(ctx->tmpBucket)) {
apr_bucket *pbktIn = APR_BRIGADE_FIRST(ctx->tmpBucket);
apr_bucket *pbktOut;
const char *data;