Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c97a38c authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly

The newly added timer_list code didn't handle middle-of-list insertions
correctly, leading to problems pairing certain Bluetooth devices as well
as causing 100% CPU usage for the Bluetooth task.

Change-Id: I3d4c22b775a91da2a3f983e8c78facbd91d4cb7d
parent ad961a19
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -673,6 +673,8 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
    }

    p_tle->p_prev = i->p_prev;
    if (p_tle->p_prev)
        p_tle->p_prev->p_next = p_tle;
    p_tle->p_next = i;
    i->p_prev = p_tle;
    i->ticks -= p_tle->ticks;