ftmod_libpri: Append new lpwrap timers in correct order.

List is sorted in ascending order of expiration time,
fix the if clause in lpwrap_start_timer().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
Stefan Knoblich 2012-09-07 00:02:32 +02:00
parent cbefc9dae1
commit a035182582
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ int lpwrap_start_timer(struct lpwrap_pri *spri, struct lpwrap_timer *timer, cons
ftdm_mutex_lock(spri->timer_mutex);
for (prev = &spri->timer_list, cur = spri->timer_list; cur; prev = &(*prev)->next, cur = cur->next) {
if (cur->timeout < timer->timeout) {
if (cur->timeout > timer->timeout) {
*prev = timer;
timer->next = cur;
break;