From 69b5a7f1a3d3276f8d7d43e3916eb9f51d839072 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 24 Apr 2019 08:21:41 +0200 Subject: [PATCH] CLEANUP: task: report calls as unsigned in show sess The "show sess" output used signed ints to report the number of calls, which is confusing for runaway tasks where the call count can turn negative. --- src/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream.c b/src/stream.c index cd47b6335..5bc9a14c9 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2991,7 +2991,7 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st } chunk_appendf(&trash, - " task=%p (state=0x%02x nice=%d calls=%d exp=%s tmask=0x%lx%s", + " task=%p (state=0x%02x nice=%d calls=%u exp=%s tmask=0x%lx%s", strm->task, strm->task->state, strm->task->nice, strm->task->calls, @@ -3331,7 +3331,7 @@ static int cli_io_handler_dump_sess(struct appctx *appctx) } chunk_appendf(&trash, - " ts=%02x age=%s calls=%d cpu=%llu lat=%llu", + " ts=%02x age=%s calls=%u cpu=%llu lat=%llu", curr_strm->task->state, human_time(now.tv_sec - curr_strm->logs.tv_accept.tv_sec, 1), curr_strm->task->calls,