[Freeswitch-svn] [commit] r11034 - freeswitch/trunk/libs/esl
FreeSWITCH SVN
anthm at freeswitch.org
Wed Dec 31 11:14:52 PST 2008
Author: anthm
Date: Wed Dec 31 14:14:52 2008
New Revision: 11034
Log:
tweak
Modified:
freeswitch/trunk/libs/esl/fs_cli.c
freeswitch/trunk/libs/esl/fs_cli.conf
Modified: freeswitch/trunk/libs/esl/fs_cli.c
==============================================================================
--- freeswitch/trunk/libs/esl/fs_cli.c (original)
+++ freeswitch/trunk/libs/esl/fs_cli.c Wed Dec 31 14:14:52 2008
@@ -25,7 +25,7 @@
esl_port_t port;
char pass[128];
int debug;
- char *console_fnkeys[12];
+ const char *console_fnkeys[12];
char loglevel[128];
int quiet;
} cli_profile_t;
@@ -60,7 +60,7 @@
*/
static unsigned char console_fnkey_pressed(int i)
{
- char *c;
+ const char *c;
assert((i > 0) && (i <= 12));
@@ -75,7 +75,6 @@
return CC_REDISPLAY;
}
-
if (process_command(global_handle, c)) {
running = thread_running = 0;
}
@@ -367,6 +366,22 @@
}
+static void set_fn_keys(cli_profile_t *profile)
+{
+ profile->console_fnkeys[0] = "help";
+ profile->console_fnkeys[1] = "status";
+ profile->console_fnkeys[2] = "show channels";
+ profile->console_fnkeys[3] = "show calls";
+ profile->console_fnkeys[4] = "sofia status";
+ profile->console_fnkeys[5] = "reloadxml";
+ profile->console_fnkeys[6] = "/log console";
+ profile->console_fnkeys[7] = "/log debug";
+ profile->console_fnkeys[8] = "sofia status profile internal";
+ profile->console_fnkeys[9] = "fsctl pause";
+ profile->console_fnkeys[10] = "fsctl resume";
+ profile->console_fnkeys[11] = "version";
+}
+
int main(int argc, char *argv[])
{
@@ -420,7 +435,9 @@
strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
strncpy(internal_profile.name, "internal", sizeof(internal_profile.name));
internal_profile.port = 8021;
-
+ set_fn_keys(&internal_profile);
+
+
if (home) {
snprintf(hfile, sizeof(hfile), "%s/.fs_cli_history", home);
snprintf(cfile, sizeof(cfile), "%s/.fs_cli_conf", home);
@@ -503,6 +520,7 @@
esl_set_string(profiles[pcount].host, "localhost");
esl_set_string(profiles[pcount].pass, "ClueCon");
profiles[pcount].port = 8021;
+ set_fn_keys(&profiles[pcount]);
esl_log(ESL_LOG_DEBUG, "Found Profile [%s]\n", profiles[pcount].name);
pcount++;
}
Modified: freeswitch/trunk/libs/esl/fs_cli.conf
==============================================================================
--- freeswitch/trunk/libs/esl/fs_cli.conf (original)
+++ freeswitch/trunk/libs/esl/fs_cli.conf Wed Dec 31 14:14:52 2008
@@ -13,7 +13,7 @@
key_f4 => show calls
key_f5 => sofia status
key_f6 => reloadxml
-key_f7 => /nolog
+key_f7 => /log console
key_f8 => /log debug
key_f9 => sofia status profile internal
key_f10 => fsctl pause
More information about the Freeswitch-svn
mailing list