another fs_cli windows fix

This commit is contained in:
Jeff Lenk 2011-09-26 11:47:00 -05:00
parent 28b380c8b5
commit 1244e55632

View File

@ -887,7 +887,7 @@ static unsigned char esl_console_complete(const char *buffer, const char *cursor
{ {
char cmd_str[2048] = ""; char cmd_str[2048] = "";
unsigned char ret = CC_REDISPLAY; unsigned char ret = CC_REDISPLAY;
char *dup = _strndup(buffer, (lastchar - buffer)); char *dup = _strndup(buffer, (int)(lastchar - buffer));
char *buf = dup; char *buf = dup;
int sc = 0, offset = (int)(cursor - buffer), pos = (offset > 0) ? offset : 0; int sc = 0, offset = (int)(cursor - buffer), pos = (offset > 0) ? offset : 0;
char *p; char *p;
@ -1250,7 +1250,7 @@ int main(int argc, char *argv[])
} else { } else {
snprintf(bare_prompt_str, sizeof(bare_prompt_str), "freeswitch@%s> ", profile->name); snprintf(bare_prompt_str, sizeof(bare_prompt_str), "freeswitch@%s> ", profile->name);
} }
bare_prompt_str_len = strlen(bare_prompt_str); bare_prompt_str_len = (int)strlen(bare_prompt_str);
#ifdef WIN32 #ifdef WIN32
snprintf(prompt_str, sizeof(prompt_str), "%s", bare_prompt_str); /* Not supporting this for now */ snprintf(prompt_str, sizeof(prompt_str), "%s", bare_prompt_str); /* Not supporting this for now */
#else #else