提交 4b07ee51 authored 作者: Anthony Minessale's avatar Anthony Minessale

remove double event crate, removing a memory leak in valet parking

上级 5a820fdc
...@@ -805,7 +805,6 @@ static void pres_event_handler(switch_event_t *event) ...@@ -805,7 +805,6 @@ static void pres_event_handler(switch_event_t *event)
int count = valet_lot_count(lot); int count = valet_lot_count(lot);
if (count) { if (count) {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) { if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", VALET_PROTO); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", VALET_PROTO);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", lot_name); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", lot_name);
...@@ -823,7 +822,6 @@ static void pres_event_handler(switch_event_t *event) ...@@ -823,7 +822,6 @@ static void pres_event_handler(switch_event_t *event)
switch_event_fire(&event); switch_event_fire(&event);
} }
found++; found++;
}
} else { } else {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) { if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", VALET_PROTO); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", VALET_PROTO);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论