mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
fix some language issues and move media bug removal to hangup state
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12225 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -140,7 +140,7 @@ static int perl_parse_and_execute(PerlInterpreter * my_perl, char *input_code, c
|
||||
return error;
|
||||
}
|
||||
|
||||
#define HACK_CLEAN_CODE "foreach my $kl(keys %main::) {undef($$kl) if (defined($$kl) && ($kl =~ /^\\w+[\\w\\d_]+$/))}"
|
||||
#define HACK_CLEAN_CODE "eval{foreach my $kl(keys %main::) {eval{undef($$kl);} if (defined($$kl) && ($kl =~ /^\\w+[\\w\\d_]+$/))}}"
|
||||
|
||||
static void destroy_perl(PerlInterpreter ** to_destroy)
|
||||
{
|
||||
@@ -434,18 +434,16 @@ static void message_query_handler(switch_event_t *event)
|
||||
char *account = switch_event_get_header(event, "message-account");
|
||||
|
||||
if (account) {
|
||||
char *path, *cmd;
|
||||
|
||||
path = switch_mprintf("%s%smwi.pl", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
|
||||
switch_assert(path != NULL);
|
||||
char path[512], *cmd;
|
||||
|
||||
switch_snprintf(path, sizeof(path), "%s%smwi.pl", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
|
||||
|
||||
if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS) {
|
||||
cmd = switch_mprintf("%s %s", path, account);
|
||||
switch_assert(cmd != NULL);
|
||||
perl_thread(cmd);
|
||||
switch_safe_free(cmd);
|
||||
}
|
||||
switch_safe_free(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user