paging: Add method to find the paging data for a given subscriber

This commit is contained in:
Holger Hans Peter Freyther
2011-06-07 19:53:29 +02:00
parent 0e412c7a55
commit 31f5f71647
2 changed files with 16 additions and 0 deletions

View File

@@ -68,4 +68,6 @@ void paging_update_buffer_space(struct gsm_bts *bts, uint16_t);
/* pending paging requests */
unsigned int paging_pending_requests_nr(struct gsm_bts *bts);
void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr);
#endif

View File

@@ -405,3 +405,17 @@ unsigned int paging_pending_requests_nr(struct gsm_bts *bts)
return requests;
}
/**
* Find any paging data for the given subscriber at the given BTS.
*/
void *paging_get_data(struct gsm_bts *bts, struct gsm_subscriber *subscr)
{
struct gsm_paging_request *req;
llist_for_each_entry(req, &bts->paging.pending_requests, entry)
if (req->subscr == subscr)
return req->cbfn_param;
return NULL;
}