]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: report calls as unsigned in show sess
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2019 06:21:41 +0000 (08:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2019 14:04:23 +0000 (16:04 +0200)
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

index cd47b63358bc064ef0c31121a23bb8543f88ca1b..5bc9a14c929654a213435ac4ed6ef2ee42168662 100644 (file)
@@ -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,