aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-06 13:48:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-06 13:48:35 +0100
commitd3a212a0e7ec28b4c9ed139b2d566155782bcba8 (patch)
treeeb65550e29665e9b56c796e378298f9d85dfcf8d /src/libserver
parent065d4b113a567567c4c93056d2c04abe877d8f71 (diff)
downloadrspamd-d3a212a0e7ec28b4c9ed139b2d566155782bcba8.tar.gz
rspamd-d3a212a0e7ec28b4c9ed139b2d566155782bcba8.zip
Use TLD file directly within API.
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/url.c6
-rw-r--r--src/libserver/url.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index dff3ea1fc..b4c605d36 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -890,7 +890,7 @@ rspamd_url_add_static_matchers (GArray *matchers)
}
void
-rspamd_url_init (struct rspamd_config *cfg)
+rspamd_url_init (const gchar *tld_file)
{
guint i;
gchar patbuf[128];
@@ -904,8 +904,8 @@ rspamd_url_init (struct rspamd_config *cfg)
url_scanner->tld_trie = rspamd_trie_create (TRUE);
rspamd_url_add_static_matchers (url_scanner->matchers);
- if (cfg != NULL && cfg->tld_file) {
- rspamd_url_parse_tld_file (cfg->tld_file, url_scanner);
+ if (tld_file != NULL) {
+ rspamd_url_parse_tld_file (tld_file, url_scanner);
}
else {
msg_warn ("tld extension file is not specified, url matching is limited");
diff --git a/src/libserver/url.h b/src/libserver/url.h
index a066d214d..8dc2a7032 100644
--- a/src/libserver/url.h
+++ b/src/libserver/url.h
@@ -7,7 +7,6 @@
struct rspamd_task;
struct mime_text_part;
-struct rspamd_config;
struct rspamd_url {
gchar *string;
@@ -67,7 +66,7 @@ enum rspamd_url_protocol {
* Initialize url library
* @param cfg
*/
-void rspamd_url_init (struct rspamd_config *cfg);
+void rspamd_url_init (const gchar *tld_file);
/*
* Parse urls inside text