[PATCH 2/3] Channel requests/Management in gsm_subscriber

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Freyther zecke at selfish.org
Sun Apr 19 19:21:48 UTC 2009


From dbc38882d295bdd50912ba33f544a7202f5907e6 Mon Sep 17 00:00:00 2001
From: Holger Freyther <ich at tamarin.(none)>
Date: Sun, 5 Apr 2009 14:36:33 +0200
Subject: [PATCH] [paging] Immediately fail if we don't have something like a 
VLR

If we don't know where to search for a GSM subscriber then
do not try to page it at all. Introduce an enum value for this
and call the callback from within the get_channel request.
---
 include/openbsc/gsm_data.h |    1 +
 src/gsm_subscriber.c       |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 6c08b03..21b05ea 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -24,6 +24,7 @@ enum gsm_hooks {
 enum gsm_paging_event {
 	GSM_PAGING_SUCCEEDED,
 	GSM_PAGING_EXPIRED,
+	GSM_PAGING_VLR_UNKNOWN,
 };
 
 struct msgb;
diff --git a/src/gsm_subscriber.c b/src/gsm_subscriber.c
index bfb4983..3082880 100644
--- a/src/gsm_subscriber.c
+++ b/src/gsm_subscriber.c
@@ -129,8 +129,12 @@ void subscr_get_channel(struct gsm_subscriber *subscr, 
int type,
 			gsm_cbfn *cbfn, void *data)
 {
         /* current_bts is the current VLR of the MobileStation */
-	if (!subscr->current_bts)
+	if (!subscr->current_bts) {
+		if (cbfn)
+			cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_VLR_UNKNOWN,
+				NULL, NULL, data);
 		return;
+	}
 
 	paging_request(subscr->current_bts, subscr, type, cbfn, data);
 }
-- 
1.6.0.4






More information about the OpenBSC mailing list