summaryrefslogtreecommitdiffstats
path: root/modules/lua/mod_lua.c
diff options
context:
space:
mode:
authorChristophe Jaillet <jailletc36@apache.org>2016-12-03 22:59:55 +0100
committerChristophe Jaillet <jailletc36@apache.org>2016-12-03 22:59:55 +0100
commite149a8d8d00fd40f467f7f621f00d1e7ebb90411 (patch)
treeb62b1c2c2eabcff929e2a44ad2cc4551a8b4d7a3 /modules/lua/mod_lua.c
parentThe default value of 'inherit' should be AP_LUA_INHERIT_UNSET. (diff)
downloadapache2-e149a8d8d00fd40f467f7f621f00d1e7ebb90411.tar.xz
apache2-e149a8d8d00fd40f467f7f621f00d1e7ebb90411.zip
Fix some style issue.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/lua/mod_lua.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
index 1076fb16b9..46e71f3652 100644
--- a/modules/lua/mod_lua.c
+++ b/modules/lua/mod_lua.c
@@ -89,7 +89,8 @@ apr_global_mutex_t *lua_ivm_mutex;
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);
}
@@ -151,9 +152,11 @@ static const char *scope_to_string(unsigned int scope)
}
}
-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);
@@ -334,7 +337,8 @@ static int lua_handler(request_rec *r)
/* ------------------- 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;
@@ -424,7 +428,8 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
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;
@@ -593,7 +598,7 @@ static apr_status_t lua_input_filter_handle(ap_filter_t *f,
/* 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;