From 812fd7278e3df362ae6e54df75273a045e4dddb1 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Wed, 25 May 2011 18:29:28 +0200 Subject: [PATCH] mod_sofia: Reformat sofia usage string and make it a static const char[]. Make this thing readable by wasting a couple of bytes for spaces and newlines. As an added bonus, save some stack space by making usage_string a static const. Signed-off-by: Stefan Knoblich --- src/mod/endpoints/mod_sofia/mod_sofia.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index c258e62dd7..2c1da9441a 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -3784,22 +3784,22 @@ SWITCH_STANDARD_API(sofia_function) switch_status_t status = SWITCH_STATUS_SUCCESS; sofia_command_t func = NULL; int lead = 1; - const char *usage_string = "USAGE:\n" + static const char usage_string[] = "USAGE:\n" "--------------------------------------------------------------------------------\n" - "sofia help\n" - "sofia profile [[start|stop|restart|rescan]|" - "flush_inbound_reg [|<[user]@domain>] [reboot]|" - "[register|unregister] [|all]|" - "killgw |" - "[stun-auto-disable|stun-enabled] [true|false]]|" - "siptrace |" - "watchdog \n" - "sofia status|xmlstatus profile [ reg ] | [ pres ] | [ user ]\n" - "sofia status|xmlstatus gateway \n" + "sofia global siptrace \n" + " watchdog \n\n" + "sofia profile [start | stop | restart | rescan]\n" + " flush_inbound_reg [ | <[user]@domain>] [reboot]\n" + " [register | unregister] [ | all]\n" + " killgw \n" + " [stun-auto-disable | stun-enabled] [true | false]]\n" + " siptrace \n" + " watchdog \n\n" + "sofia profile [reg ] | [pres ] | [user ]\n" + "sofia gateway \n\n" "sofia loglevel [0-9]\n" - "sofia tracelevel \n" - "sofia global siptrace |" - "watchdog \n" + "sofia tracelevel \n\n" + "sofia help\n" "--------------------------------------------------------------------------------\n"; if (zstr(cmd)) {