From: Stefan Knoblich Date: Wed, 25 May 2011 16:29:28 +0000 (+0200) Subject: mod_sofia: Reformat sofia usage string and make it a static const char[]. X-Git-Tag: v1.2-rc1~108^2~11^2~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=812fd7278e3df362ae6e54df75273a045e4dddb1;p=thirdparty%2Ffreeswitch.git 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 --- 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)) {