Change in ...osmo-sgsn[master]: gprs_gmm: gsm48_rx_gmm_att_req(): refactor duplicated code

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/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Sep 2 08:59:44 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15174 )

Change subject: gprs_gmm: gsm48_rx_gmm_att_req(): refactor duplicated code
......................................................................

gprs_gmm: gsm48_rx_gmm_att_req(): refactor duplicated code

Change-Id: I709f847802a975e1a75d0b87ac5125240cfd0854
---
M src/gprs/gprs_gmm.c
1 file changed, 6 insertions(+), 10 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 185cd9a..00335e8 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -1460,11 +1460,6 @@
 			}
 			osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi));
 		}
-		if (ctx->ran_type == MM_CTX_T_GERAN_Gb) {
-			ctx->gb.tlli = msgb_tlli(msg);
-			ctx->gb.llme = llme;
-		}
-		msgid2mmctx(ctx, msg);
 		break;
 	case GSM_MI_TYPE_TMSI:
 		memcpy(&tmsi, mi+1, 4);
@@ -1485,11 +1480,6 @@
 			}
 			ctx->p_tmsi = tmsi;
 		}
-		if (ctx->ran_type == MM_CTX_T_GERAN_Gb) {
-			ctx->gb.tlli = msgb_tlli(msg);
-			ctx->gb.llme = llme;
-		}
-		msgid2mmctx(ctx, msg);
 		break;
 	default:
 		LOGMMCTXP(LOGL_NOTICE, ctx, "Rejecting ATTACH REQUEST with "
@@ -1497,6 +1487,12 @@
 		reject_cause = GMM_CAUSE_MS_ID_NOT_DERIVED;
 		goto rejected;
 	}
+
+	if (ctx->ran_type == MM_CTX_T_GERAN_Gb) {
+		ctx->gb.tlli = msgb_tlli(msg);
+		ctx->gb.llme = llme;
+	}
+	msgid2mmctx(ctx, msg);
 	/* Update MM Context with currient RA and Cell ID */
 	ctx->ra = ra_id;
 	if (ctx->ran_type == MM_CTX_T_GERAN_Gb)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15174
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I709f847802a975e1a75d0b87ac5125240cfd0854
Gerrit-Change-Number: 15174
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190902/017f4b02/attachment.htm>


More information about the gerrit-log mailing list