提交 18e527f2 authored 作者: Michael Jerris's avatar Michael Jerris

fix build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10948 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 afcc875e
......@@ -228,13 +228,6 @@ int main(int argc, char *argv[])
char cfile[512] = ".\\fs_cli_config";
char *home = ""; //getenv("HOME");
#endif
strncpy(profiles[0].host, "127.0.0.1", sizeof(profiles[0].host));
strncpy(profiles[0].pass, "ClueCon", sizeof(profiles[0].pass));
strncpy(profiles[0].name, "default", sizeof(profiles[0].name));
profiles[0].port = 8021;
pcount++;
/* Vars for optargs */
int opt;
static struct option options[] = {
......@@ -245,6 +238,11 @@ int main(int argc, char *argv[])
{0, 0, 0, 0}
};
strncpy(profiles[0].host, "127.0.0.1", sizeof(profiles[0].host));
strncpy(profiles[0].pass, "ClueCon", sizeof(profiles[0].pass));
strncpy(profiles[0].name, "default", sizeof(profiles[0].name));
profiles[0].port = 8021;
pcount++;
if (home) {
snprintf(hfile, sizeof(hfile), "%s/.fs_cli_history", home);
......@@ -287,7 +285,7 @@ int main(int argc, char *argv[])
esl_config_close_file(&cfg);
}
while (1){
for(;;) {
int option_index = 0;
opt = getopt_long(argc, argv, "H:U:P:S:p:h?", options, &option_index);
if (opt == -1) break;
......
......@@ -861,7 +861,7 @@ ESL_DECLARE(esl_status_t) esl_send(esl_handle_t *handle, const char *cmd)
esl_log(ESL_LOG_DEBUG, "SEND\n%s\n", cmd);
}
if (send(handle->sock, cmd, strlen(cmd), 0) != strlen(cmd)) {
if (send(handle->sock, cmd, strlen(cmd), 0) != (int)strlen(cmd)) {
strerror_r(handle->errnum, handle->err, sizeof(handle->err));
return ESL_FAIL;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论