[Asterisk-code-review] cli: increase channel column width (asterisk[20])

Friendly Automation asteriskteam at digium.com
Thu Mar 16 10:14:50 CDT 2023


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19989 )

Change subject: cli: increase channel column width
......................................................................

cli: increase channel column width

For 'core show channels', the Channel name field is increased
to 64 characters and the Location name field is increased to
32 characters.

For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.

ASTERISK-30455

Change-Id: Ibec3742ce360ffc93bc56e9984c2a21dabc4d5e1
---
A doc/CHANGES-staging/cli_channel_display_length_increase.txt
M main/cli.c
2 files changed, 37 insertions(+), 4 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




diff --git a/doc/CHANGES-staging/cli_channel_display_length_increase.txt b/doc/CHANGES-staging/cli_channel_display_length_increase.txt
new file mode 100644
index 0000000..d9fc77c
--- /dev/null
+++ b/doc/CHANGES-staging/cli_channel_display_length_increase.txt
@@ -0,0 +1,14 @@
+Subject: cli
+Subject: core
+
+This change increases the display width on 'core show channels'
+amd 'core show channels verbose'
+
+For 'core show channels', the Channel name field is increased to
+64 characters and the Location name field is increased to 32
+characters.
+
+For 'core show channels verbose', the Channel name field is
+increased to 80 characters, the Context is increased to 24
+characters and the Extension is increased to 24 characters.
+
diff --git a/main/cli.c b/main/cli.c
index 0386335..2cb0722 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1098,11 +1098,11 @@
 
 static char *handle_chanlist(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-#define FORMAT_STRING  "%-20.20s %-20.20s %-7.7s %-30.30s\n"
-#define FORMAT_STRING2 "%-20.20s %-20.20s %-7.7s %-30.30s\n"
+#define FORMAT_STRING  "%-64.64s %-32.32s %-7.7s %-30.30s\n"
+#define FORMAT_STRING2 "%-64.64s %-32.32s %-7.7s %-30.30s\n"
 #define CONCISE_FORMAT_STRING  "%s!%s!%s!%d!%s!%s!%s!%s!%s!%s!%d!%s!%s!%s\n"
-#define VERBOSE_FORMAT_STRING  "%-20.20s %-20.20s %-16.16s %4d %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"
-#define VERBOSE_FORMAT_STRING2 "%-20.20s %-20.20s %-16.16s %-4.4s %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"
+#define VERBOSE_FORMAT_STRING  "%-80.80s %-24.24s %-24.24s %4d %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"
+#define VERBOSE_FORMAT_STRING2 "%-80.80s %-24.24s %-24.24s %-4.4s %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"
 
 	struct ao2_container *channels;
 	struct ao2_iterator it_chans;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19989
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: Ibec3742ce360ffc93bc56e9984c2a21dabc4d5e1
Gerrit-Change-Number: 19989
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230316/1d5313b6/attachment.html>


More information about the asterisk-code-review mailing list