aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-21 15:52:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-21 17:58:51 +0100
commit6b676918bbb037c111fa2616f1709ead9ac3c788 (patch)
tree5d5dfeed936482f5431eac4e0428746a90885678 /src/libserver
parente971c539fa763d3f632735ec59f1d5e50685467f (diff)
downloadrspamd-6b676918bbb037c111fa2616f1709ead9ac3c788.tar.gz
rspamd-6b676918bbb037c111fa2616f1709ead9ac3c788.zip
[Rework] Drop url tags
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/html.c3
-rw-r--r--src/libserver/url.c28
-rw-r--r--src/libserver/url.h11
3 files changed, 0 insertions, 42 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index 4ff310f1c..fa33ffdfb 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -721,9 +721,6 @@ rspamd_html_url_is_phished (rspamd_mempool_t *pool,
href_url->phished_url = text_url;
phished_tld.begin = href_tok.begin;
phished_tld.len = href_tok.len;
- rspamd_url_add_tag (text_url, "phishing",
- rspamd_mempool_ftokdup (pool, &phished_tld),
- pool);
text_url->flags |= RSPAMD_URL_FLAG_HTML_DISPLAYED;
}
}
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)
{
diff --git a/src/libserver/url.h b/src/libserver/url.h
index 6f1ccf59f..d9e15e212 100644
--- a/src/libserver/url.h
+++ b/src/libserver/url.h
@@ -70,7 +70,6 @@ struct rspamd_url {
enum rspamd_url_flags flags;
guint count;
- GHashTable *tags;
};
enum uri_errno {
@@ -214,16 +213,6 @@ void rspamd_url_task_subject_callback (struct rspamd_url *url,
gsize start_offset,
gsize end_offset, gpointer ud);
-/**
- * Adds a tag for url
- * @param url
- * @param tag
- * @param pool
- */
-void rspamd_url_add_tag (struct rspamd_url *url, const gchar *tag,
- const gchar *value,
- rspamd_mempool_t *pool);
-
guint rspamd_url_hash (gconstpointer u);
guint rspamd_email_hash (gconstpointer u);