mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10961 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4bfb153513
commit
e8e72dd313
@ -18,7 +18,6 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
static char prompt_str[512] = "";
|
static char prompt_str[512] = "";
|
||||||
static char hostname[512] = "";
|
|
||||||
|
|
||||||
#ifdef HAVE_EDITLINE
|
#ifdef HAVE_EDITLINE
|
||||||
static char *prompt(EditLine * e)
|
static char *prompt(EditLine * e)
|
||||||
@ -236,9 +235,9 @@ int main(int argc, char *argv[])
|
|||||||
char cfile[512] = "/tmp/fs_cli_config";
|
char cfile[512] = "/tmp/fs_cli_config";
|
||||||
char *home = getenv("HOME");
|
char *home = getenv("HOME");
|
||||||
#else
|
#else
|
||||||
char hfile[512] = ".\\fs_cli_history";
|
char hfile[512] = "fs_cli_history";
|
||||||
char cfile[512] = ".\\fs_cli_config";
|
char cfile[512] = "fs_cli_config";
|
||||||
char *home = ""; //getenv("HOME");
|
char *home = getenv("HOME");
|
||||||
#endif
|
#endif
|
||||||
/* Vars for optargs */
|
/* Vars for optargs */
|
||||||
int opt;
|
int opt;
|
||||||
@ -276,7 +275,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
signal(SIGINT, handle_SIGINT);
|
signal(SIGINT, handle_SIGINT);
|
||||||
gethostname(hostname, sizeof(hostname));
|
|
||||||
|
|
||||||
handle.debug = 0;
|
handle.debug = 0;
|
||||||
esl_global_set_default_logger(0); /* default debug level to 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);
|
snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", profile->name);
|
||||||
|
}
|
||||||
|
|
||||||
if (esl_connect(&handle, profile->host, profile->port, profile->pass)) {
|
if (esl_connect(&handle, profile->host, profile->port, profile->pass)) {
|
||||||
esl_log(ESL_LOG_ERROR, "Error Connecting [%s]\n", handle.err);
|
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:
|
done:
|
||||||
|
|
||||||
esl_mutex_unlock(handle->mutex);
|
if (handle->mutex) esl_mutex_unlock(handle->mutex);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user