summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/pjsua
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip-apps/src/pjsua')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app_cli.c14
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app_common.c2
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app_config.c7
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app_legacy.c21
4 files changed, 24 insertions, 20 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app_cli.c b/pjsip-apps/src/pjsua/pjsua_app_cli.c
index 795c084b..771539a8 100644
--- a/pjsip-apps/src/pjsua/pjsua_app_cli.c
+++ b/pjsip-apps/src/pjsua/pjsua_app_cli.c
@@ -280,7 +280,7 @@ void cli_destroy()
/* Get input URL */
static void get_input_url(char *buf,
- int len,
+ pj_size_t len,
pj_cli_cmd_val *cval,
struct input_result *result)
{
@@ -305,7 +305,7 @@ static void get_input_url(char *buf,
if (pj_isdigit(*buf) || *buf=='-') {
- int i;
+ unsigned i;
if (*buf=='-')
i = 1;
@@ -315,7 +315,7 @@ static void get_input_url(char *buf,
for (; i<len; ++i) {
if (!pj_isdigit(buf[i])) {
pj_cli_sess_write_msg(cval->sess, err_invalid_input.ptr,
- err_invalid_input.slen);
+ (int)err_invalid_input.slen);
return;
}
}
@@ -331,7 +331,7 @@ static void get_input_url(char *buf,
return;
pj_cli_sess_write_msg(cval->sess, err_invalid_input.ptr,
- err_invalid_input.slen);
+ (int)err_invalid_input.slen);
result->nb_result = PJSUA_APP_NO_NB;
return;
@@ -790,13 +790,13 @@ static pj_status_t cmd_del_account(pj_cli_cmd_val *cval)
if (!pjsua_acc_is_valid(i)) {
pj_ansi_snprintf(out_str, sizeof(out_str),
"Invalid account id %d\n", i);
- str_len = pj_ansi_strlen(out_str);
+ str_len = (unsigned)pj_ansi_strlen(out_str);
pj_cli_sess_write_msg(cval->sess, out_str, str_len);
} else {
pjsua_acc_del(i);
pj_ansi_snprintf(out_str, sizeof(out_str),
"Account %d deleted\n", i);
- str_len = pj_ansi_strlen(out_str);
+ str_len = (unsigned)pj_ansi_strlen(out_str);
pj_cli_sess_write_msg(cval->sess, out_str, str_len);
}
return PJ_SUCCESS;
@@ -2492,7 +2492,7 @@ static pj_status_t cmd_video_handler(pj_cli_cmd_val *cval)
status = cmd_vid_win_list();
break;
case CMD_VIDEO_WIN_ARRANGE:
- status = cmd_arrange_vid_win(cval);
+ status = cmd_arrange_vid_win();
break;
case CMD_VIDEO_WIN_SHOW:
case CMD_VIDEO_WIN_HIDE:
diff --git a/pjsip-apps/src/pjsua/pjsua_app_common.c b/pjsip-apps/src/pjsua/pjsua_app_common.c
index e02f0456..2f79cae5 100644
--- a/pjsip-apps/src/pjsua/pjsua_app_common.c
+++ b/pjsip-apps/src/pjsua/pjsua_app_common.c
@@ -142,7 +142,7 @@ void log_call_dump(int call_id)
unsigned log_decor;
pjsua_call_dump(call_id, PJ_TRUE, some_buf, sizeof(some_buf), " ");
- call_dump_len = strlen(some_buf);
+ call_dump_len = (unsigned)strlen(some_buf);
log_decor = pj_log_get_decor();
pj_log_set_decor(log_decor & ~(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_CR));
diff --git a/pjsip-apps/src/pjsua/pjsua_app_config.c b/pjsip-apps/src/pjsua/pjsua_app_config.c
index 60d4aefa..f7450d02 100644
--- a/pjsip-apps/src/pjsua/pjsua_app_config.c
+++ b/pjsip-apps/src/pjsua/pjsua_app_config.c
@@ -246,7 +246,8 @@ static int read_config_file(pj_pool_t *pool, const char *filename,
char *p;
const char *whitespace = " \t\r\n";
char cDelimiter;
- int len, token_len;
+ pj_size_t len;
+ int token_len;
pj_bzero(line, sizeof(line));
if (fgets(line, sizeof(line), fhnd) == NULL) break;
@@ -285,7 +286,7 @@ static int read_config_file(pj_pool_t *pool, const char *filename,
}
*p = '\0';
- token_len = p-token;
+ token_len = (int)(p-token);
if (token_len > 0) {
if (*token == '#')
@@ -2175,5 +2176,5 @@ int write_settings(pjsua_app_config *config, char *buf, pj_size_t max)
}
*(cfg.ptr + cfg.slen) = '\0';
- return cfg.slen;
+ return (int)cfg.slen;
}
diff --git a/pjsip-apps/src/pjsua/pjsua_app_legacy.c b/pjsip-apps/src/pjsua/pjsua_app_legacy.c
index c3d9af1c..e49490b0 100644
--- a/pjsip-apps/src/pjsua/pjsua_app_legacy.c
+++ b/pjsip-apps/src/pjsua/pjsua_app_legacy.c
@@ -61,7 +61,7 @@ static void print_buddy_list()
/*
* Input URL.
*/
-static void ui_input_url(const char *title, char *buf, int len,
+static void ui_input_url(const char *title, char *buf, pj_size_t len,
input_result *result)
{
result->nb_result = PJSUA_APP_NO_NB;
@@ -79,7 +79,7 @@ static void ui_input_url(const char *title, char *buf, int len,
printf("%s: ", title);
fflush(stdout);
- if (fgets(buf, len, stdin) == NULL)
+ if (fgets(buf, (int)len, stdin) == NULL)
return;
len = strlen(buf);
@@ -98,7 +98,7 @@ static void ui_input_url(const char *title, char *buf, int len,
if (pj_isdigit(*buf) || *buf=='-') {
- int i;
+ unsigned i;
if (*buf=='-')
i = 1;
@@ -143,7 +143,7 @@ static pj_bool_t simple_input(const char *title, char *buf, pj_size_t len)
char *p;
printf("%s (empty to cancel): ", title); fflush(stdout);
- if (fgets(buf, len, stdin) == NULL)
+ if (fgets(buf, (int)len, stdin) == NULL)
return PJ_FALSE;
/* Remove trailing newlines. */
@@ -1674,7 +1674,7 @@ void legacy_main()
char menuin[80];
char buf[128];
- keystroke_help(current_call);
+ keystroke_help();
for (;;) {
@@ -1688,7 +1688,8 @@ void legacy_main()
* If exit is desired end script with q for quit
*/
/* Reopen stdin/stdout/stderr to /dev/console */
-#if defined(PJ_WIN32) && PJ_WIN32!=0 && \
+#if ((defined(PJ_WIN32) && PJ_WIN32!=0) || \
+ (defined(PJ_WIN64) && PJ_WIN64!=0)) && \
(!defined(PJ_WIN32_WINCE) || PJ_WIN32_WINCE==0)
if (freopen ("CONIN$", "r", stdin) == NULL) {
#else
@@ -1847,9 +1848,11 @@ void legacy_main()
ui_echo(menuin);
break;
- case 's':
- ui_sleep(menuin);
- break;
+ case 's':
+ if (pj_ansi_strnicmp(menuin, "sleep", 5)==0) {
+ ui_sleep(menuin);
+ break;
+ }
/* Continue below */
case 'u':