diff options
-rw-r--r-- | src/knot/query/requestor.c | 6 | ||||
-rw-r--r-- | src/libknot/errcode.h | 4 | ||||
-rw-r--r-- | src/libknot/error.c | 4 |
3 files changed, 5 insertions, 9 deletions
diff --git a/src/knot/query/requestor.c b/src/knot/query/requestor.c index e374c82fc..0880fa8e7 100644 --- a/src/knot/query/requestor.c +++ b/src/knot/query/requestor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2019 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -204,7 +204,7 @@ static int request_reset(knot_requestor_t *req, knot_request_t *last) } if (req->layer.state == KNOT_STATE_RESET) { - return KNOT_LAYER_ERROR; + return KNOT_EPROCESSING; } return KNOT_EOK; @@ -308,7 +308,7 @@ int knot_requestor_exec(knot_requestor_t *requestor, knot_request_t *request, /* Expect complete request. */ if (requestor->layer.state != KNOT_STATE_DONE) { - ret = KNOT_LAYER_ERROR; + ret = KNOT_EPROCESSING; } /* Verify last TSIG */ diff --git a/src/libknot/errcode.h b/src/libknot/errcode.h index 972dc842f..6e09e753a 100644 --- a/src/libknot/errcode.h +++ b/src/libknot/errcode.h @@ -79,6 +79,7 @@ enum knot_error { KNOT_EFILE, KNOT_ESOAINVAL, KNOT_ETRAIL, + KNOT_EPROCESSING, /* Control states. */ KNOT_CTL_ESTOP, @@ -127,9 +128,6 @@ enum knot_error { KNOT_TXN_EEXISTS, KNOT_TXN_ENOTEXISTS, - /* Processing error. */ - KNOT_LAYER_ERROR, - /* DNSSEC errors. */ KNOT_INVALID_PUBLIC_KEY, KNOT_INVALID_PRIVATE_KEY, diff --git a/src/libknot/error.c b/src/libknot/error.c index 16104728b..a80d5c22d 100644 --- a/src/libknot/error.c +++ b/src/libknot/error.c @@ -78,6 +78,7 @@ static const struct error errors[] = { { KNOT_EFILE, "file error" }, { KNOT_ESOAINVAL, "SOA mismatch" }, { KNOT_ETRAIL, "trailing data" }, + { KNOT_EPROCESSING, "processing error" }, /* Control states. */ { KNOT_CTL_ESTOP, "stopping server" }, @@ -126,9 +127,6 @@ static const struct error errors[] = { { KNOT_TXN_EEXISTS, "too many transactions" }, { KNOT_TXN_ENOTEXISTS, "no active transaction" }, - /* Processing errors. */ - { KNOT_LAYER_ERROR, "processing layer error" }, - /* DNSSEC errors. */ { KNOT_INVALID_PUBLIC_KEY, "invalid public key" }, { KNOT_INVALID_PRIVATE_KEY, "invalid private key" }, |