mod_commands: check for zstr(cmd) in escape_function

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16029 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-12-22 21:44:46 +00:00
parent 7af5b4f6f7
commit 3f021b986f
1 changed files with 9 additions and 2 deletions

View File

@ -3866,8 +3866,15 @@ SWITCH_STANDARD_API(hupall_api_function)
SWITCH_STANDARD_API(escape_function)
{
int len = strlen(cmd)*2;
char *mycmd = malloc(strlen(cmd)*2);
int len;
char *mycmd;
if (zstr(cmd)) {
return SWITCH_STATUS_SUCCESS;
}
len = strlen(cmd)*2;
mycmd = malloc(len);
stream->write_function(stream, "%s", switch_escape_string(cmd, mycmd, len));