diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-21 15:01:41 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-21 15:01:41 +0400 |
commit | 13d35d6e24df40bd6764b0bb9a9bc1f554508fab (patch) | |
tree | 348336de95d1a6cac10f858aaa5efcff419dd62a /src/plugins/regexp.c | |
parent | 5218877e6a4daf614fc765927af8b0cda02bc95f (diff) | |
download | rspamd-13d35d6e24df40bd6764b0bb9a9bc1f554508fab.tar.gz rspamd-13d35d6e24df40bd6764b0bb9a9bc1f554508fab.zip |
Another workaround for old glib.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r-- | src/plugins/regexp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 5112678bc..35be00bd7 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -1287,7 +1287,9 @@ process_regexp_item (struct worker_task *task, void *user_data) if (!item->lua_function && regexp_module_ctx->max_threads > 1) { if (regexp_module_ctx->workers == NULL) { #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) - g_thread_init (NULL); + if (! g_thread_get_initialized ()) { + g_thread_init (NULL); + } workers_mtx = g_mutex_new (); #else workers_mtx = memory_pool_alloc (regexp_module_ctx->regexp_pool, sizeof (GMutex)); |