fix regression from previous patch
This commit is contained in:
parent
8446b0f262
commit
a6a9700696
|
@ -276,6 +276,7 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||||
if (token->timeout) {
|
if (token->timeout) {
|
||||||
const char *var = switch_channel_get_variable(channel, "valet_ticket");
|
const char *var = switch_channel_get_variable(channel, "valet_ticket");
|
||||||
|
|
||||||
|
if (!zstr(var)) {
|
||||||
if (!strcmp(var, token->uuid)) {
|
if (!strcmp(var, token->uuid)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Valet ticket %s accepted.\n", var);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Valet ticket %s accepted.\n", var);
|
||||||
switch_channel_set_variable(channel, "valet_ticket", NULL);
|
switch_channel_set_variable(channel, "valet_ticket", NULL);
|
||||||
|
@ -285,8 +286,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (token && (b_session = switch_core_session_locate(token->uuid))) {
|
if (!zstr(token->uuid) && (b_session = switch_core_session_locate(token->uuid))) {
|
||||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, VALET_EVENT) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, VALET_EVENT) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Valet-Lot-Name", lot_name);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Valet-Lot-Name", lot_name);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Valet-Extension", ext);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Valet-Extension", ext);
|
||||||
|
|
Loading…
Reference in New Issue