[PATCH 1/3] Remove use_lchan and put_lchan from location updating

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
Fri Jun 5 02:16:30 UTC 2009


Andreas Eversberg is suspecting that some of these messages
are not balanced and we are seeing a leak here. The general location
updating request is guarded by the "location updating request" object
inside the lchan that will keep the channel open for at least five
seconds to get all the information we need.
---
 src/gsm_04_08.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index fd47d8b..a91ef7a 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -481,11 +481,6 @@ static int mm_rx_id_resp(struct msgb *msg)
 	DEBUGP(DMM, "IDENTITY RESPONSE: mi_type=0x%02x MI(%s)\n",
 		mi_type, mi_string);
 
-	/*
-	 * Rogue messages could trick us but so is life
-	 */
-	put_lchan(lchan);
-
 	switch (mi_type) {
 	case GSM_MI_TYPE_IMSI:
 		if (!lchan->subscr)
@@ -573,7 +568,6 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
 	switch (mi_type) {
 	case GSM_MI_TYPE_IMSI:
 		/* we always want the IMEI, too */
-		use_lchan(lchan);
 		rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMEI);
 		lchan->loc_operation->waiting_for_imei = 1;
 
@@ -582,7 +576,6 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
 		break;
 	case GSM_MI_TYPE_TMSI:
 		/* we always want the IMEI, too */
-		use_lchan(lchan);
 		rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMEI);
 		lchan->loc_operation->waiting_for_imei = 1;
 
@@ -590,7 +583,6 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
 		subscr = subscr_get_by_tmsi(mi_string);
 		if (!subscr) {
 			/* send IDENTITY REQUEST message to get IMSI */
-			use_lchan(lchan);
 			rc = mm_tx_identity_req(lchan, GSM_MI_TYPE_IMSI);
 			lchan->loc_operation->waiting_for_imsi = 1;
 		}
-- 
1.6.3.1







More information about the OpenBSC mailing list