do this slightly safer so we don't have the mutex locked when we exec the app
This commit is contained in:
parent
046fb90da5
commit
ef17574193
|
@ -2760,10 +2760,12 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready_value(switch_c
|
||||||
SWITCH_DECLARE(switch_status_t) switch_channel_execute_on(switch_channel_t *channel, const char *variable_prefix)
|
SWITCH_DECLARE(switch_status_t) switch_channel_execute_on(switch_channel_t *channel, const char *variable_prefix)
|
||||||
{
|
{
|
||||||
switch_event_header_t *hi;
|
switch_event_header_t *hi;
|
||||||
|
switch_event_t *event;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
if ((hi = switch_channel_variable_first(channel))) {
|
switch_channel_get_variables(channel, &event);
|
||||||
for (; hi; hi = hi->next) {
|
|
||||||
|
for (hi = event->headers; hi; hi = hi->next) {
|
||||||
char *var = hi->name;
|
char *var = hi->name;
|
||||||
char *val = hi->value;
|
char *val = hi->value;
|
||||||
char *app;
|
char *app;
|
||||||
|
@ -2785,8 +2787,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_execute_on(switch_channel_t *chan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_channel_variable_last(channel);
|
|
||||||
}
|
switch_event_destroy(&event);
|
||||||
|
|
||||||
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue