diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-08 00:06:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-08 00:22:38 +0000 |
commit | ee6d9a408653d6932dfa425dfe7b516d43df782d (patch) | |
tree | 254e8568b6ef2c73287efd321400afbdb4a07aed | |
parent | 3903d701522d6b6f82fd46a893c130f5ce46bf5a (diff) | |
download | rspamd-ee6d9a408653d6932dfa425dfe7b516d43df782d.tar.gz rspamd-ee6d9a408653d6932dfa425dfe7b516d43df782d.zip |
Remove stupid locks that are unused for a long time
-rw-r--r-- | src/libmime/filter.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c index 11d9f85d1..79ad37838 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -203,12 +203,6 @@ insert_metric_result (struct rspamd_task *task, w); } -#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) -static GStaticMutex result_mtx = G_STATIC_MUTEX_INIT; -#else -G_LOCK_DEFINE (result_mtx); -#endif - static void insert_result_common (struct rspamd_task *task, const gchar *symbol, @@ -219,12 +213,6 @@ insert_result_common (struct rspamd_task *task, struct metric *metric; GList *cur, *metric_list; - /* Avoid concurrenting inserting of results */ -#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) - g_static_mutex_lock (&result_mtx); -#else - G_LOCK (result_mtx); -#endif metric_list = g_hash_table_lookup (task->cfg->metrics_symbols, symbol); if (metric_list) { cur = metric_list; @@ -254,11 +242,6 @@ insert_result_common (struct rspamd_task *task, /* XXX: it is not wise to destroy them here */ g_list_free (opts); } -#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) - g_static_mutex_unlock (&result_mtx); -#else - G_UNLOCK (result_mtx); -#endif } /* Insert result that may be increased on next insertions */ |