提交 372330ac authored 作者: Stefan Knoblich's avatar Stefan Knoblich 提交者: Ken Rice

ftmod_libpri: Reset timer parameters in lpwrap_run_expired() before invoking the callback.

Allowing us to restart the timer from the callback with lpwrap_start_timer().
Signed-off-by: 's avatarStefan Knoblich <stkn@openisdn.net>
上级 a756d287
......@@ -275,15 +275,17 @@ static int lpwrap_run_expired(struct lpwrap_pri *spri, ftdm_time_t now_ms)
/* fire callbacks */
while ((cur = expired_list)) {
timeout_handler handler = cur->callback;
expired_list = cur->next;
if (cur->callback)
cur->callback(spri, cur);
/* stop timer */
/* Stop timer */
cur->next = NULL;
cur->timeout = 0;
cur->callback = NULL;
}
if (handler)
handler(spri, cur);
}
return 0;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论