aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-09 19:49:59 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-09 19:49:59 +0400
commit54792e26fbc26ef0a724c2b301dd74a788e3f6dd (patch)
tree656ba7b7d19fb2052f7283dd56cba84b94887883 /src/dns.c
parent5e458871b31a8657118d88bccccf376d76c150fc (diff)
downloadrspamd-54792e26fbc26ef0a724c2b301dd74a788e3f6dd.tar.gz
rspamd-54792e26fbc26ef0a724c2b301dd74a788e3f6dd.zip
* Remove evdns and use only rspamd resolver
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dns.c b/src/dns.c
index e9f057b5e..58ca9ffe2 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -560,6 +560,7 @@ dns_fin_cb (gpointer arg)
{
struct rspamd_dns_request *req = arg;
+ event_del (&req->timer_event);
g_hash_table_remove (req->resolver->requests, GUINT_TO_POINTER (req->id));
}
@@ -735,7 +736,6 @@ dns_parse_rr (guint8 *in, union rspamd_reply_element *elt, guint8 **pos, struct
{
guint8 *p = *pos;
guint16 type, datalen;
- guint16 addrcount;
/* Skip the whole name */
if (! dns_parse_labels (in, NULL, &p, rep, remain, FALSE)) {
@@ -759,10 +759,8 @@ dns_parse_rr (guint8 *in, union rspamd_reply_element *elt, guint8 **pos, struct
}
else {
if (!(datalen & 0x3) && datalen <= *remain) {
- addrcount = MIN (elt->a.addrcount + (datalen >> 2), MAX_ADDRS);
- memcpy (&elt->a.addr[elt->a.addrcount], p, addrcount * sizeof (struct in_addr));
+ memcpy (&elt->a.addr[0], p, sizeof (struct in_addr));
p += datalen;
- elt->a.addrcount += addrcount;
}
else {
msg_info ("corrupted A record");