提交 95c7fb01 authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #1221 in FS/freeswitch from…

Merge pull request #1221 in FS/freeswitch from ~NBLASGEN/freeswitch:feature/FS-10084-mod_v8-block-for-event to master

* commit 'd9c6ebc8':
  FS-10084 [mod_v8] Fixed incorrect variable name
  FS-10084 [mod_v8] If the value passed is negative, block until event is received
...@@ -336,6 +336,10 @@ JS_EVENTHANDLER_FUNCTION_IMPL(GetEvent) ...@@ -336,6 +336,10 @@ JS_EVENTHANDLER_FUNCTION_IMPL(GetEvent)
if (switch_queue_pop_timeout(_event_queue, &pop, (switch_interval_time_t) timeout * 1000) == SWITCH_STATUS_SUCCESS && pop) { if (switch_queue_pop_timeout(_event_queue, &pop, (switch_interval_time_t) timeout * 1000) == SWITCH_STATUS_SUCCESS && pop) {
pevent = (switch_event_t *) pop; pevent = (switch_event_t *) pop;
} }
} else if (timeout < 0) {
if (switch_queue_pop(_event_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
pevent = (switch_event_t *) pop;
}
} else { } else {
if (switch_queue_trypop(_event_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) { if (switch_queue_trypop(_event_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
pevent = (switch_event_t *) pop; pevent = (switch_event_t *) pop;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论