aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h2
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c28
2 files changed, 7 insertions, 23 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index 6fe3cf9b0..0628d1f47 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -140,6 +140,8 @@ bool subscr_authorized(struct gsm_subscriber *subsc);
struct subscr_request *subscr_request_conn(struct gsm_subscriber *subscr,
gsm_cbfn *cbfn, void *param);
void subscr_remove_request(struct subscr_request *req);
+int subscr_rx_paging_response(struct msgb *msg,
+ struct gsm_subscriber_connection *conn);
/* internal */
struct gsm_subscriber *subscr_alloc(void);
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index e044e0144..4f47761eb 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -59,10 +59,6 @@ static struct gsm_subscriber *get_subscriber(struct gsm_subscriber_group *sgrp,
return subscr;
}
-#if 0
-TODO implement paging response in libmsc!
-Excluding this to be able to link without libbsc:
-
/*
* We got the channel assigned and can now hand this channel
* over to one of our callbacks.
@@ -77,14 +73,6 @@ static int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
OSMO_ASSERT(subscr->is_paging);
- /*
- * Stop paging on all other BTS. E.g. if this is
- * the first timeout on a BTS then the others will
- * timeout soon as well. Let's just stop everything
- * and forget we wanted to page.
- */
- paging_request_stop(NULL, subscr, NULL, NULL);
-
/* Inform parts of the system we don't know */
sig_data.subscr = subscr;
sig_data.bts = conn ? conn->bts : NULL;
@@ -137,25 +125,19 @@ static int subscr_paging_sec_cb(unsigned int hooknum, unsigned int event,
return rc;
}
-static int subscr_paging_cb(unsigned int hooknum, unsigned int event,
- struct msgb *msg, void *data, void *param)
+int subscr_rx_paging_response(struct msgb *msg,
+ struct gsm_subscriber_connection *conn)
{
- struct gsm_subscriber_connection *conn = data;
struct gsm48_hdr *gh;
struct gsm48_pag_resp *pr;
- /* Other cases mean problem, dispatch direclty */
- if (event != GSM_PAGING_SUCCEEDED)
- return subscr_paging_dispatch(hooknum, event, msg, data, param);
-
- /* Get paging response */
+ /* Get key_seq from Paging Response headers */
gh = msgb_l3(msg);
pr = (struct gsm48_pag_resp *)gh->data;
- /* We _really_ have a channel, secure it now ! */
- return gsm48_secure_channel(conn, pr->key_seq, subscr_paging_sec_cb, param);
+ /* Secure the connection */
+ return gsm48_secure_channel(conn, pr->key_seq, subscr_paging_sec_cb, NULL);
}
-#endif
struct subscr_request *subscr_request_channel(struct gsm_subscriber *subscr,
int channel_type, gsm_cbfn *cbfn, void *param)