Commit 36cb5688 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_create): Initialize adns_query.

(isc_destroy): Cancel any pending adns query.
parent f773aacf
......@@ -48,6 +48,8 @@
#include <assert.h>
#include "oop.h"
#include "adns.h"
#include "oop-adns.h"
#include "s-string.h"
#include "timeval-util.h"
......@@ -188,6 +190,7 @@ isc_create(struct isc_mcb *mcb,
scb->stale_output_cb = NULL;
scb->acceptable_idle_time = cfg->idle_timeout;
scb->resolve_callback = NULL;
scb->adns_query = NULL;
scb->pub.remote = EMPTY_STRING;
scb->cfg = cfg;
......@@ -383,13 +386,15 @@ isc_destroy(struct isc_mcb *mcb,
if (sci->resolve_callback != NULL)
{
/* FIXME (bug 627): Cancel adns query here. */
if (sci->adns_query != NULL)
oop_adns_cancel(sci->adns_query);
else
mcb->event_source->cancel_time(mcb->event_source, OOP_TIME_NOW,
isc_dns_resolve_cb, scb);
cb = sci->resolve_callback;
sci->resolve_callback = NULL;
cb(scb, isc_resolve_aborted, 0);
cb = sci->resolve_callback;
sci->resolve_callback = NULL;
cb(scb, isc_resolve_aborted, 0);
}
isc_cancel_read_callback(sci);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment