only clear scope vars when they were set
This commit is contained in:
parent
c35c138db5
commit
d4fcba74c8
|
@ -1980,6 +1980,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||
const char *app;
|
||||
switch_core_session_message_t msg = { 0 };
|
||||
char delim = ',';
|
||||
int scope = 1;
|
||||
|
||||
switch_assert(application_interface);
|
||||
|
||||
|
@ -2010,6 +2011,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||
free(dup);
|
||||
|
||||
switch_channel_set_scope_variables(session->channel, &ovars);
|
||||
scope = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2091,7 +2093,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||
switch_safe_free(expanded);
|
||||
}
|
||||
|
||||
if (scope) {
|
||||
switch_channel_set_scope_variables(session->channel, NULL);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue