Skip to content
Snippets Groups Projects
Commit 210060b8 authored by Karel Slaný's avatar Karel Slaný Committed by Ondřej Surý
Browse files

Added checks for FAIL and DONE when calling cookie module functions.

parent 0d2572aa
Branches
Tags
No related merge requests found
......@@ -222,6 +222,10 @@ int check_response(knot_layer_t *ctx, knot_pkt_t *pkt)
struct kr_query *qry = req->current_query;
struct kr_cookie_ctx *cookie_ctx = &req->ctx->cookie_ctx;
if (ctx->state & (KNOT_STATE_DONE | KNOT_STATE_FAIL)) {
return ctx->state;
}
if (!cookie_ctx->clnt.enabled || (qry->flags & QUERY_TCP)) {
return ctx->state;
}
......@@ -341,6 +345,10 @@ int check_request(knot_layer_t *ctx, void *module_param)
knot_pkt_t *answer = req->answer;
if (ctx->state & (KNOT_STATE_DONE | KNOT_STATE_FAIL)) {
return ctx->state;
}
if (!srvr_sett->enabled) {
/* TODO -- IS there a way how to determine whether the original
* request came via TCP? */
......
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