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 <s.knoblich@axsentis.de>
This commit is contained in:
Stefan Knoblich 2011-05-25 18:29:28 +02:00
parent 1086cba2be
commit 812fd7278e

View File

@ -3784,22 +3784,22 @@ SWITCH_STANDARD_API(sofia_function)
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_SUCCESS;
sofia_command_t func = NULL; sofia_command_t func = NULL;
int lead = 1; int lead = 1;
const char *usage_string = "USAGE:\n" static const char usage_string[] = "USAGE:\n"
"--------------------------------------------------------------------------------\n" "--------------------------------------------------------------------------------\n"
"sofia help\n" "sofia global siptrace <on|off>\n"
"sofia profile <profile_name> [[start|stop|restart|rescan]|" " watchdog <on|off>\n\n"
"flush_inbound_reg [<call_id>|<[user]@domain>] [reboot]|" "sofia profile <name> [start | stop | restart | rescan]\n"
"[register|unregister] [<gateway name>|all]|" " flush_inbound_reg [<call_id> | <[user]@domain>] [reboot]\n"
"killgw <gateway name>|" " [register | unregister] [<gateway name> | all]\n"
"[stun-auto-disable|stun-enabled] [true|false]]|" " killgw <gateway name>\n"
"siptrace <on|off>|" " [stun-auto-disable | stun-enabled] [true | false]]\n"
"watchdog <on|off>\n" " siptrace <on|off>\n"
"sofia status|xmlstatus profile <name> [ reg <contact str> ] | [ pres <pres str> ] | [ user <user@domain> ]\n" " watchdog <on|off>\n\n"
"sofia status|xmlstatus gateway <name>\n" "sofia <status|xmlstatus> profile <name> [reg <contact str>] | [pres <pres str>] | [user <user@domain>]\n"
"sofia <status|xmlstatus> gateway <name>\n\n"
"sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]\n" "sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]\n"
"sofia tracelevel <console|alert|crit|err|warning|notice|info|debug>\n" "sofia tracelevel <console|alert|crit|err|warning|notice|info|debug>\n\n"
"sofia global siptrace <on|off>|" "sofia help\n"
"watchdog <on|off>\n"
"--------------------------------------------------------------------------------\n"; "--------------------------------------------------------------------------------\n";
if (zstr(cmd)) { if (zstr(cmd)) {