paging: Dispatch the SS_PAGING signals at the MSC code level
This way the channel is fully ready for use.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index bd76fae..ed76e45 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -72,12 +72,25 @@
struct msgb *msg, void *data, void *param)
{
struct subscr_request *request;
+ struct gsm_subscriber_connection *conn = data;
struct gsm_subscriber *subscr = param;
+ struct paging_signal_data sig_data;
/* There is no request anymore... */
if (llist_empty(&subscr->requests))
return -1;
+ /* Dispatch signal */
+ sig_data.subscr = subscr;
+ sig_data.bts = conn ? conn->bts : NULL;
+ sig_data.conn = conn;
+ dispatch_signal(
+ SS_PAGING,
+ event == GSM_PAGING_SUCCEEDED ?
+ S_PAGING_SUCCEEDED : S_PAGING_EXPIRED,
+ &sig_data
+ );
+
/*
* FIXME: What to do with paging requests coming during
* this callback? We must be sure to not start paging when