diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-21 15:52:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-21 17:58:51 +0100 |
commit | 6b676918bbb037c111fa2616f1709ead9ac3c788 (patch) | |
tree | 5d5dfeed936482f5431eac4e0428746a90885678 /src/libserver/url.c | |
parent | e971c539fa763d3f632735ec59f1d5e50685467f (diff) | |
download | rspamd-6b676918bbb037c111fa2616f1709ead9ac3c788.tar.gz rspamd-6b676918bbb037c111fa2616f1709ead9ac3c788.zip |
[Rework] Drop url tags
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r-- | src/libserver/url.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index 9314ce2bb..d770b2191 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -3176,34 +3176,6 @@ rspamd_url_task_subject_callback (struct rspamd_url *url, gsize start_offset, } } -void -rspamd_url_add_tag (struct rspamd_url *url, const gchar *tag, - const gchar *value, - rspamd_mempool_t *pool) -{ - struct rspamd_url_tag *found, *ntag; - - g_assert (url != NULL && tag != NULL && value != NULL); - - if (url->tags == NULL) { - url->tags = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); - rspamd_mempool_add_destructor (pool, - (rspamd_mempool_destruct_t)g_hash_table_unref, url->tags); - } - - found = g_hash_table_lookup (url->tags, tag); - - ntag = rspamd_mempool_alloc0 (pool, sizeof (*ntag)); - ntag->data = rspamd_mempool_strdup (pool, value); - - if (found == NULL) { - g_hash_table_insert (url->tags, rspamd_mempool_strdup (pool, tag), - ntag); - } - - DL_APPEND (found, ntag); -} - guint rspamd_url_hash (gconstpointer u) { |