提交 e8e72dd3 authored 作者: Michael Jerris's avatar Michael Jerris

cleanup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10961 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4bfb1535
......@@ -18,7 +18,6 @@
#include <getopt.h>
static char prompt_str[512] = "";
static char hostname[512] = "";
#ifdef HAVE_EDITLINE
static char *prompt(EditLine * e)
......@@ -236,9 +235,9 @@ int main(int argc, char *argv[])
char cfile[512] = "/tmp/fs_cli_config";
char *home = getenv("HOME");
#else
char hfile[512] = ".\\fs_cli_history";
char cfile[512] = ".\\fs_cli_config";
char *home = ""; //getenv("HOME");
char hfile[512] = "fs_cli_history";
char cfile[512] = "fs_cli_config";
char *home = getenv("HOME");
#endif
/* Vars for optargs */
int opt;
......@@ -276,7 +275,6 @@ int main(int argc, char *argv[])
}
signal(SIGINT, handle_SIGINT);
gethostname(hostname, sizeof(hostname));
handle.debug = 0;
esl_global_set_default_logger(0); /* default debug level to 0 */
......@@ -381,11 +379,13 @@ int main(int argc, char *argv[])
}
}
esl_log(ESL_LOG_INFO, "Using profile %s\n", profile->name);
esl_log(ESL_LOG_INFO, "Using profile %s [%s]\n", profile->name, profile->host);
gethostname(hostname, sizeof(hostname));
if (argv_host) {
snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", profile->host);
} else {
snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", profile->name);
}
if (esl_connect(&handle, profile->host, profile->port, profile->pass)) {
esl_log(ESL_LOG_ERROR, "Error Connecting [%s]\n", handle.err);
......
......@@ -634,7 +634,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event_timed(esl_handle_t *handle, uint32_t ms
done:
esl_mutex_unlock(handle->mutex);
if (handle->mutex) esl_mutex_unlock(handle->mutex);
return status;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论