[PATCH 2/3] [paging] Immediately fail if we don't have something like

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
Sat Jun 6 12:50:21 UTC 2009


From 6f3d3f1b8ea8ef1e54367a0c8963c7c358addfb8 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 2/3] [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       |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index e85adf8..297d505 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -25,6 +25,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 19de6dc..d9e7116 100644
--- a/src/gsm_subscriber.c
+++ b/src/gsm_subscriber.c
@@ -147,9 +147,15 @@ void subscr_get_channel(struct gsm_subscriber *subscr,
 		bts = gsm_bts_by_lac(gsmnet, subscr->lac, NULL);
 
 	if (!bts)
-		return;
+		goto error;
 
 	paging_request(bts, subscr, type, cbfn, data);
+	return;
+
+error:
+	if (!cbfn)
+		return;
+	cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_VLR_UNKNOWN, NULL, NULL, data);
 }
 
 void subscr_put_channel(struct gsm_lchan *lchan)
-- 
1.6.3.1






More information about the OpenBSC mailing list