mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Use a mutex to control read/write for IVM values, so we can reuse the existing structures without running into race conditions.
This should get rid of the need to have MaxConnectionsPerChild set to > 0. If a new value is set and is a string, we either use the existing varbuf or grow it accordingly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470156 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <apr_thread_mutex.h>
|
||||
|
||||
#include "lua_apr.h"
|
||||
#include "lua_config.h"
|
||||
@@ -63,6 +64,7 @@ typedef struct
|
||||
int broken;
|
||||
} lua_filter_ctx;
|
||||
|
||||
apr_thread_mutex_t* lua_ivm_mutex = NULL;
|
||||
|
||||
/**
|
||||
* error reporting if lua has an error.
|
||||
@@ -1970,6 +1972,9 @@ static void lua_register_hooks(apr_pool_t *p)
|
||||
#endif
|
||||
/* providers */
|
||||
lua_authz_providers = apr_hash_make(p);
|
||||
|
||||
/* ivm mutex */
|
||||
apr_thread_mutex_create(&lua_ivm_mutex, APR_THREAD_MUTEX_DEFAULT, p);
|
||||
}
|
||||
|
||||
AP_DECLARE_MODULE(lua) = {
|
||||
|
Reference in New Issue
Block a user