From: Oto Šťáva Date: Mon, 22 Jul 2024 09:26:59 +0000 (+0200) Subject: daemon/session2: use kr_strerror for logging error states X-Git-Tag: v6.0.8^2~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbac242b371beb98293fd5dd85b370e9f026053;p=thirdparty%2Fknot-resolver.git daemon/session2: use kr_strerror for logging error states --- diff --git a/daemon/session2.c b/daemon/session2.c index 53f90bcdd..0d1a69f50 100644 --- a/daemon/session2.c +++ b/daemon/session2.c @@ -395,19 +395,21 @@ static int protolayer_iter_ctx_finish(struct protolayer_iter_ctx *ctx, int ret) globals->iter_deinit(ctx, d); } - if (ret) + if (ret) { VERBOSE_LOG(s, "layer context of group '%s' (on %u: %s) ended with return code %d\n", kr_proto_name(s->proto), ctx->layer_ix, layer_name_ctx(ctx), ret); + } - if (ctx->status) - VERBOSE_LOG(s, "iteration of group '%s' (on %u: %s) ended with status %d\n", + if (ctx->status) { + VERBOSE_LOG(s, "iteration of group '%s' (on %u: %s) ended with status '%s (%d)'\n", kr_proto_name(s->proto), - ctx->layer_ix, layer_name_ctx(ctx), ctx->status); + ctx->layer_ix, layer_name_ctx(ctx), + kr_strerror(ctx->status), ctx->status); + } if (ctx->finished_cb) - ctx->finished_cb(ret, s, ctx->comm, - ctx->finished_cb_baton); + ctx->finished_cb(ret, s, ctx->comm, ctx->finished_cb_baton); mm_ctx_delete(&ctx->pool); free(ctx);