From: Vladimír Čunát Date: Wed, 18 Jan 2017 17:17:21 +0000 (+0100) Subject: QUERY_TRACE: disable with -DNDEBUG X-Git-Tag: v1.2.0-rc3~3^2~2^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6fcdc0d039c1f04bf9afd448d26116f34f9a407;p=thirdparty%2Fknot-resolver.git QUERY_TRACE: disable with -DNDEBUG At least for now. It didn't compile. --- diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index ec2251b15..b2066240b 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -745,12 +745,12 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt) if (!query) { return ctx->state; } - +#ifndef NDEBUG if (query->flags & QUERY_TRACE) { VERBOSE_MSG("<= answer received:\n"); kr_pkt_print(pkt); } - +#endif if (query->flags & (QUERY_RESOLVED|QUERY_BADCOOKIE_AGAIN)) { return ctx->state; } diff --git a/lib/rplan.h b/lib/rplan.h index 896176bc1..60df1369d 100644 --- a/lib/rplan.h +++ b/lib/rplan.h @@ -51,7 +51,7 @@ X(BADCOOKIE_AGAIN, 1 << 22) /**< Query again because bad cookie returned. */ \ X(CNAME, 1 << 23) /**< Query response contains CNAME in answer section. */ \ X(REORDER_RR, 1 << 24) /**< Reorder cached RRs. */ \ - X(TRACE, 1 << 25) /**< Log answer with kr_verbose_log(). */ + X(TRACE, 1 << 25) /**< Log answer with kr_verbose_log(), unless -DNDEBUG. */ /* 1 << 31 Used by ../modules/dns64/dns64.lua */ /** Query flags */