Commit 6f071989 authored by Brian Wellington's avatar Brian Wellington
Browse files

cancellation fixes

parent 2a123ac0
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: validator.c,v 1.74 2000/08/15 00:52:49 bwelling Exp $ */
/* $Id: validator.c,v 1.75 2000/08/15 01:22:33 bwelling Exp $ */
#include <config.h>
......@@ -298,6 +298,12 @@ keyvalidated(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
isc_event_free(&event);
if (SHUTDOWN(val)) {
dns_validator_destroy(&val);
return;
......@@ -306,12 +312,6 @@ keyvalidated(isc_task_t *task, isc_event_t *event) {
if (val->event == NULL)
return;
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
isc_event_free(&event);
validator_log(val, ISC_LOG_DEBUG(3), "in keyvalidated");
LOCK(&val->lock);
if (eresult == ISC_R_SUCCESS) {
......@@ -432,6 +432,13 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
devent = (dns_validatorevent_t *)event;
rdataset = devent->rdataset;
sigrdataset = devent->sigrdataset;
val = devent->ev_arg;
eresult = devent->result;
dns_validator_destroy(&val->authvalidator);
if (SHUTDOWN(val)) {
dns_validator_destroy(&val);
return;
......@@ -440,14 +447,6 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
if (val->event == NULL)
return;
devent = (dns_validatorevent_t *)event;
rdataset = devent->rdataset;
sigrdataset = devent->sigrdataset;
val = devent->ev_arg;
eresult = devent->result;
dns_validator_destroy(&val->authvalidator);
validator_log(val, ISC_LOG_DEBUG(3), "in authvalidated");
LOCK(&val->lock);
if (eresult != ISC_R_SUCCESS) {
......@@ -484,6 +483,12 @@ negauthvalidated(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
isc_event_free(&event);
dns_validator_destroy(&val->authvalidator);
if (SHUTDOWN(val)) {
dns_validator_destroy(&val);
return;
......@@ -492,13 +497,6 @@ negauthvalidated(isc_task_t *task, isc_event_t *event) {
if (val->event == NULL)
return;
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
isc_event_free(&event);
dns_validator_destroy(&val->authvalidator);
validator_log(val, ISC_LOG_DEBUG(3), "in negauthvalidated");
LOCK(&val->lock);
if (eresult == ISC_R_SUCCESS) {
......@@ -532,22 +530,23 @@ nullkeyvalidated(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
if (SHUTDOWN(val)) {
dns_validator_destroy(&val);
return;
}
if (val->event == NULL)
return;
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
dns_name_free(devent->name, val->view->mctx);
isc_mem_put(val->view->mctx, devent->name, sizeof(dns_name_t));
dns_validator_destroy(&val->keyvalidator);
isc_event_free(&event);
if (SHUTDOWN(val)) {
dns_validator_destroy(&val);
return;
}
if (val->event == NULL)
return;
validator_log(val, ISC_LOG_DEBUG(3), "in nullkeyvalidated");
if (eresult == ISC_R_SUCCESS) {
validator_log(val, ISC_LOG_DEBUG(3),
......@@ -563,8 +562,6 @@ nullkeyvalidated(isc_task_t *task, isc_event_t *event) {
UNLOCK(&val->lock);
}
dns_validator_destroy(&val->keyvalidator);
/*
* Free stuff from the event.
*/
......
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