paging: Give the msgb that caused paging_stop up to the paging callback
The handler might need to know some info of the paging response Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
1e24550d3d
commit
c7ff2572a7
|
@ -60,7 +60,8 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
|
|||
|
||||
/* stop paging requests */
|
||||
void paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr,
|
||||
struct gsm_subscriber_connection *conn);
|
||||
struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg);
|
||||
|
||||
/* update paging load */
|
||||
void paging_update_buffer_space(struct gsm_bts *bts, u_int16_t);
|
||||
|
|
|
@ -309,7 +309,7 @@ int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn,
|
|||
dispatch_signal(SS_PAGING, S_PAGING_SUCCEEDED, &sig_data);
|
||||
|
||||
/* Stop paging on the bts we received the paging response */
|
||||
paging_request_stop(conn->bts, subscr, conn);
|
||||
paging_request_stop(conn->bts, subscr, conn, msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,8 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
|
|||
|
||||
/* we consciously ignore the type of the request here */
|
||||
static void _paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr,
|
||||
struct gsm_subscriber_connection *conn)
|
||||
struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg)
|
||||
{
|
||||
struct gsm_bts_paging_state *bts_entry = &bts->paging;
|
||||
struct gsm_paging_request *req, *req2;
|
||||
|
@ -351,7 +352,7 @@ static void _paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *sub
|
|||
if (conn && req->cbfn) {
|
||||
LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d, calling cbfn.\n", bts->nr);
|
||||
req->cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED,
|
||||
NULL, conn, req->cbfn_param);
|
||||
msg, conn, req->cbfn_param);
|
||||
} else
|
||||
LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d silently.\n", bts->nr);
|
||||
paging_remove_request(&bts->paging, req);
|
||||
|
@ -362,12 +363,13 @@ static void _paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *sub
|
|||
|
||||
/* Stop paging on all other bts' */
|
||||
void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
|
||||
struct gsm_subscriber_connection *conn)
|
||||
struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg)
|
||||
{
|
||||
struct gsm_bts *bts = NULL;
|
||||
|
||||
if (_bts)
|
||||
_paging_request_stop(_bts, subscr, conn);
|
||||
_paging_request_stop(_bts, subscr, conn, msg);
|
||||
|
||||
do {
|
||||
/*
|
||||
|
@ -382,7 +384,7 @@ void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
|
|||
|
||||
/* Stop paging */
|
||||
if (bts != _bts)
|
||||
_paging_request_stop(bts, subscr, NULL);
|
||||
_paging_request_stop(bts, subscr, NULL, NULL);
|
||||
} while (1);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ void trans_free(struct gsm_trans *trans)
|
|||
|
||||
if (!trans->conn && trans->subscr && trans->subscr->net) {
|
||||
/* Stop paging on all bts' */
|
||||
paging_request_stop(NULL, trans->subscr, NULL);
|
||||
paging_request_stop(NULL, trans->subscr, NULL, NULL);
|
||||
}
|
||||
|
||||
if (trans->subscr)
|
||||
|
|
Loading…
Reference in New Issue