Skip to content

Commit 0d11938

Browse files
InterLinked1kharwell
authored andcommitted
chan_iax2: Fix spacing in netstats command
The iax2 show netstats command previously didn't contain enough spacing in the header to properly align the table header with the table body. This caused column headers to not align with the values on longer channel names. Some spacing is added to account for the longest channel names that display (before truncation occurs) so that columns are always properly aligned. ASTERISK-29895 #close patches: 61205_misaligned2.patch submitted by Birger Harzenetter (license 5870) Change-Id: I450ce6bb81157b9d6d149007e53b749f237b6d9f
1 parent 5ac5c2b commit 0d11938

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: channels/chan_iax2.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -7503,7 +7503,7 @@ static int ast_cli_netstats(struct mansession *s, int fd, int limit_fmt)
75037503
int numchans = 0;
75047504
char first_message[10] = { 0, };
75057505
char last_message[10] = { 0, };
7506-
#define ACN_FORMAT1 "%-20.25s %4u %4d %4d %5d %3d %5d %4d %6d %4d %4d %5d %3d %5d %4d %6d %s%s %4s%s\n"
7506+
#define ACN_FORMAT1 "%-24.25s %4u %4d %4d %5d %3d %5d %4d %6d %4d %4d %5d %3d %5d %4d %6d %s%s %4s%s\n"
75077507
#define ACN_FORMAT2 "%s %u %d %d %d %d %d %d %d %d %d %d %d %d %d %d %s%s %s%s\n"
75087508
for (x = 0; x < ARRAY_LEN(iaxs); x++) {
75097509
ast_mutex_lock(&iaxsl[x]);
@@ -7597,8 +7597,8 @@ static char *handle_cli_iax2_show_netstats(struct ast_cli_entry *e, int cmd, str
75977597
}
75987598
if (a->argc != 3)
75997599
return CLI_SHOWUSAGE;
7600-
ast_cli(a->fd, " -------- LOCAL --------------------- -------- REMOTE --------------------\n");
7601-
ast_cli(a->fd, "Channel RTT Jit Del Lost %% Drop OOO Kpkts Jit Del Lost %% Drop OOO Kpkts FirstMsg LastMsg\n");
7600+
ast_cli(a->fd, " -------- LOCAL --------------------- -------- REMOTE --------------------\n");
7601+
ast_cli(a->fd, "Channel RTT Jit Del Lost %% Drop OOO Kpkts Jit Del Lost %% Drop OOO Kpkts FirstMsg LastMsg\n");
76027602
numchans = ast_cli_netstats(NULL, a->fd, 1);
76037603
ast_cli(a->fd, "%d active IAX channel%s\n", numchans, (numchans != 1) ? "s" : "");
76047604
return CLI_SUCCESS;

0 commit comments

Comments
 (0)