[paging] Fix crash, move_to_next can not be used....
move_to_next is using the last_request but we do not have
one... but we know the list is not empty so just pick the
first entry.
diff --git a/src/paging.c b/src/paging.c
index c7fccad..0e5e457 100644
--- a/src/paging.c
+++ b/src/paging.c
@@ -131,7 +131,8 @@
}
if (!paging_bts->last_request)
- paging_move_to_next(paging_bts);
+ paging_bts->last_request =
+ (struct gsm_paging_request *)paging_bts->pending_requests.next;
assert(paging_bts->last_request);
initial_request = paging_bts->last_request;
@@ -150,7 +151,8 @@
*/
paging_move_to_next(paging_bts);
if (!paging_bts->last_request)
- paging_move_to_next(paging_bts);
+ paging_bts->last_request =
+ (struct gsm_paging_request *)paging_bts->pending_requests.next;
current_request = paging_bts->last_request;
} while (paging_bts->available_slots > 0
&& initial_request != current_request);