From ee6d9a408653d6932dfa425dfe7b516d43df782d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 8 Feb 2016 00:06:18 +0000 Subject: [PATCH] Remove stupid locks that are unused for a long time --- src/libmime/filter.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/libmime/filter.c b/src/libmime/filter.c index 11d9f85d1e..79ad378386 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 */ -- 2.47.3