Commit f773aacf authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_initialize): Initialize an oop adns adapter.

(isc_shutdown): Delete the oop adns adapter.
parent 043e034c
......@@ -43,6 +43,8 @@
#endif
#include "oop.h"
#include "adns.h"
#include "oop-adns.h"
#include "s-string.h"
#include "timeval-util.h"
......@@ -60,10 +62,21 @@ isc_initialize(oop_source *event_source,
isc_write_queue_change_cb *write_change_cb)
{
struct isc_mcb * mcb;
oop_adapter_adns * adns;
adns = oop_adns_new(event_source,
0
|adns_if_logpid
|adns_if_checkc_entex
|adns_if_nosigpipe,
stderr);
if (adns == NULL)
return NULL;
ISC_XNEW(mcb);
ISC_XNEW(mcb->scfg);
mcb->sessions = NULL;
mcb->adns = adns;
/* Setup default values */
mcb->scfg->max.msgsize = ISC_DEFAULT_MAX_MSG_SIZE;
......@@ -126,6 +139,7 @@ isc_shutdown(struct isc_mcb * mcb)
while (mcb->sessions)
isc_destroy(mcb, &mcb->sessions->scb->pub);
oop_adns_delete(mcb->adns);
isc_free(mcb->scfg);
isc_free(mcb);
}
Supports Markdown
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