mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
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:
parent
7af5b4f6f7
commit
3f021b986f
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user