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>
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c
index e8d54ac..b632933 100644
--- a/openbsc/src/gsm_04_08_utils.c
+++ b/openbsc/src/gsm_04_08_utils.c
@@ -309,7 +309,7 @@
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;
}
diff --git a/openbsc/src/paging.c b/openbsc/src/paging.c
index 18d41aa..70f378a 100644
--- a/openbsc/src/paging.c
+++ b/openbsc/src/paging.c
@@ -340,7 +340,8 @@
/* 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 @@
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 @@
/* 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 @@
/* Stop paging */
if (bts != _bts)
- _paging_request_stop(bts, subscr, NULL);
+ _paging_request_stop(bts, subscr, NULL, NULL);
} while (1);
}
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index 59414a4..10bf457 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -98,7 +98,7 @@
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)