unsigned int attributes;
dns_view_t *view;
dns_dispatch_t *dispatch;
- isc_nmhandle_t *handle; /* Permanent pointer to handle */
- isc_nmhandle_t *sendhandle; /* Waiting for send callback */
- isc_nmhandle_t *reqhandle; /* Waiting for request callback
- (query, update, notify) */
- isc_nmhandle_t *updatehandle; /* Waiting for update callback */
+ isc_nmhandle_t *handle; /* Permanent pointer to handle */
+ isc_nmhandle_t *sendhandle; /* Waiting for send callback */
+ isc_nmhandle_t *reqhandle; /* Waiting for request callback
+ (query, update, notify) */
+ isc_nmhandle_t *updatehandle; /* Waiting for update callback */
+ isc_nmhandle_t *restarthandle; /* Waiting for restart callback */
unsigned char *tcpbuf;
size_t tcpbuf_size;
dns_message_t *message;
async_restart(void *arg) {
query_ctx_t *qctx = arg;
ns_client_t *client = qctx->client;
+ isc_nmhandle_t *handle = client->restarthandle;
+
+ client->restarthandle = NULL;
ns__query_start(qctx);
qctx_freedata(qctx);
qctx_destroy(qctx);
isc_mem_put(client->manager->mctx, qctx, sizeof(*qctx));
+ isc_nmhandle_detach(&handle);
}
/*
saved_qctx = isc_mem_get(qctx->client->manager->mctx,
sizeof(*saved_qctx));
qctx_save(qctx, saved_qctx);
+ isc_nmhandle_attach(qctx->client->handle,
+ &qctx->client->restarthandle);
isc_async_run(qctx->client->manager->loop, async_restart,
saved_qctx);
return (DNS_R_CONTINUE);