]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Remove stupid locks that are unused for a long time
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Feb 2016 00:06:18 +0000 (00:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Feb 2016 00:22:38 +0000 (00:22 +0000)
src/libmime/filter.c

index 11d9f85d1ebc165432fcc6daa4c61292d657dab9..79ad3783862d1cdd3a5e977f5d1ec276a4912ea3 100644 (file)
@@ -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 */