diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-06 18:00:35 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-06 18:00:35 +0300 |
commit | 0f3ffee8009da397270ce1ea127dab84285ed432 (patch) | |
tree | af235694a16dfefa032e9fea64336918b58fcf91 /src | |
parent | 555778c43a3148fd88d3b3562ae2634318110b22 (diff) | |
download | rspamd-0f3ffee8009da397270ce1ea127dab84285ed432.tar.gz rspamd-0f3ffee8009da397270ce1ea127dab84285ed432.zip |
* Fix logic of parsing hoster's domains in surbl module
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/surbl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 46162c57d..1185da68f 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -265,7 +265,7 @@ format_surbl_request (memory_pool_t *pool, f_str_t *hostname, struct suffix_item part2 = g_match_info_fetch (info, 2); g_match_info_free (info); result = memory_pool_alloc (pool, len); - msg_debug ("format_surbl_request: got normal 2-d level domain %s.%s", part1, part2); + snprintf (result, len, "%s.%s", part1, part2); if (g_hash_table_lookup (surbl_module_ctx->hosters, result) != NULL) { /* Match additional part for hosters */ g_free (part1); @@ -287,7 +287,10 @@ format_surbl_request (memory_pool_t *pool, f_str_t *hostname, struct suffix_item g_match_info_free (info); return NULL; } - snprintf (result, len, "%s.%s.%s", part1, part2, suffix->suffix); + else { + snprintf (result, len, "%s.%s.%s", part1, part2, suffix->suffix); + msg_debug ("format_surbl_request: got normal 2-d level domain %s.%s", part1, part2); + } g_free (part1); g_free (part2); return result; |