diff options
author | Alfred E. Heggestad <aeh@db.org> | 2016-08-01 19:46:05 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2016-08-01 19:46:05 +0200 |
commit | 400c9533b4f6e072b560345f7e4348d6a51106a9 (patch) | |
tree | 41bba5cd0911c7ebf224feaf8a71d45df85f8318 | |
parent | 26c176c839a749a8ca2b9530909248a64ef429aa (diff) |
move some debug commands from menu to debug_cmd
- Move commands 'g' 'u' and 'i' from menu.so
module to debug.cmd.so module
- This can be useful for example if baresip is loaded
with a server-type module_app (e.g. echo.so and b2bua.so)
instead of a client-type module app (menu.so)
-rw-r--r-- | modules/debug_cmd/debug_cmd.c | 17 | ||||
-rw-r--r-- | modules/menu/menu.c | 17 |
2 files changed, 17 insertions, 17 deletions
diff --git a/modules/debug_cmd/debug_cmd.c b/modules/debug_cmd/debug_cmd.c index 19d3adb..aee65cc 100644 --- a/modules/debug_cmd/debug_cmd.c +++ b/modules/debug_cmd/debug_cmd.c @@ -48,12 +48,29 @@ static int print_system_info(struct re_printf *pf, void *arg) } +static int cmd_config_print(struct re_printf *pf, void *unused) +{ + (void)unused; + return config_print(pf, conf_config()); +} + + +static int cmd_ua_debug(struct re_printf *pf, void *unused) +{ + (void)unused; + return ua_debug(pf, uag_current()); +} + + static const struct cmd debugcmdv[] = { {'M', 0, "Main loop debug", re_debug }, + {'g', 0, "Print configuration", cmd_config_print }, + {'i', 0, "SIP debug", ua_print_sip_status }, {'m', 0, "Module debug", mod_debug }, {'n', 0, "Network debug", cmd_net_debug }, {'s', 0, "System info", print_system_info }, {'t', 0, "Timer debug", tmr_status }, + {'u', 0, "UA debug", cmd_ua_debug }, {'y', 0, "Memory status", mem_status }, }; diff --git a/modules/menu/menu.c b/modules/menu/menu.c index b256615..4349f48 100644 --- a/modules/menu/menu.c +++ b/modules/menu/menu.c @@ -392,13 +392,6 @@ static int cmd_ua_next(struct re_printf *pf, void *unused) } -static int cmd_ua_debug(struct re_printf *pf, void *unused) -{ - (void)unused; - return ua_debug(pf, uag_cur()); -} - - static int cmd_print_calls(struct re_printf *pf, void *unused) { (void)unused; @@ -406,13 +399,6 @@ static int cmd_print_calls(struct re_printf *pf, void *unused) } -static int cmd_config_print(struct re_printf *pf, void *unused) -{ - (void)unused; - return config_print(pf, conf_config()); -} - - static const struct cmd cmdv[] = { {'\n', 0, "Accept incoming call", cmd_answer }, {'D', 0, "Accept incoming call", cmd_answer }, @@ -420,15 +406,12 @@ static const struct cmd cmdv[] = { {'c', 0, "Call status", ua_print_call_status }, {'d', CMD_PRM, "Dial", dial_handler }, {'h', 0, "Help menu", cmd_print }, - {'i', 0, "SIP debug", ua_print_sip_status }, {'l', 0, "List active calls", cmd_print_calls }, {'o', CMD_PRM, "Options", options_command }, {'r', 0, "Registration info", ua_print_reg_status }, - {'u', 0, "UA debug", cmd_ua_debug }, {0x1b, 0, "Hangup call", cmd_hangup }, {' ', 0, "Toggle UAs", cmd_ua_next }, {'T', 0, "Toggle UAs", cmd_ua_next }, - {'g', 0, "Print configuration", cmd_config_print }, {'R', CMD_PRM, "Create User-Agent", create_ua }, {'#', CMD_PRM, NULL, dial_handler }, {'*', CMD_PRM, NULL, dial_handler }, |