[PATCH] openbsc[master]: gprs/sgsn: rename gprs->mm_state -> gmm_state

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Sat Feb 4 05:05:56 UTC 2017


Review at  https://gerrit.osmocom.org/1754

gprs/sgsn: rename gprs->mm_state -> gmm_state

GMM is the right term. MM state is already occupied.

Change-Id: I9cfdcf921e4ebd14a5e7ce7489ec4ce5d1f5515f
---
M openbsc/include/openbsc/gprs_sgsn.h
M openbsc/src/gprs/gprs_gmm.c
M openbsc/src/gprs/gprs_sgsn.c
M openbsc/src/gprs/sgsn_libgtp.c
M openbsc/src/gprs/sgsn_vty.c
M openbsc/tests/sgsn/sgsn_test.c
6 files changed, 81 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/54/1754/1

diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index dc165d3..f50de11 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -36,9 +36,9 @@
 	PMM_DETACHED,
 	PMM_CONNECTED,
 	PMM_IDLE,
-	MM_IDLE = PMM_DETACHED,
-	MM_READY = PMM_CONNECTED,
-	MM_STANDBY = PMM_IDLE,
+	MM_IDLE,
+	MM_READY,
+	MM_STANDBY,
 };
 
 enum gprs_mm_ctr {
@@ -126,7 +126,7 @@
 	enum sgsn_ran_type	ran_type;
 
 	char 			imsi[GSM23003_IMSI_MAX_DIGITS+1];
-	enum gprs_gmm_state	mm_state;
+	enum gprs_gmm_state	gmm_state;
 	enum gprs_pmm_state	pmm_state;	/* Iu: page when in PMM-IDLE mode */
 	uint32_t 		p_tmsi;
 	uint32_t 		p_tmsi_old;	/* old P-TMSI before new is confirmed */
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 6fde757..9ac1077 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -119,24 +119,37 @@
 
 void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state)
 {
+	if (ctx->ran_type != MM_CTX_T_UTRAN_Iu)
+		return;
+
 	if (ctx->pmm_state == state)
 		return;
 
 	LOGMMCTXP(LOGL_INFO, ctx, "Changing PMM state from %i to %i\n", ctx->pmm_state, state);
 
-	if (ctx->ran_type == MM_CTX_T_UTRAN_Iu)
-	{
-		switch (state) {
-		case PMM_IDLE:
-			/* TODO: start RA Upd timer */
-			mmctx_change_gtpu_endpoints_to_sgsn(ctx);
-			break;
-		case PMM_CONNECTED:
-			break;
-		default:
-			break;
-		}
+	switch (state) {
+	case PMM_IDLE:
+		/* TODO: start RA Upd timer */
+		mmctx_change_gtpu_endpoints_to_sgsn(ctx);
+		break;
+	case PMM_CONNECTED:
+		break;
+	default:
+		break;
 	}
+
+	ctx->pmm_state = state;
+}
+
+void mmctx_set_mm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state)
+{
+	if (ctx->ran_type != MM_CTX_T_GERAN_Gb)
+		return;
+
+	if (ctx->pmm_state == state)
+		return;
+
+	LOGMMCTXP(LOGL_INFO, ctx, "Changing MM state from %i to %i\n", ctx->pmm_state, state);
 
 	ctx->pmm_state = state;
 }
@@ -274,9 +287,9 @@
 	LOGMMCTXP(LOGL_INFO, ctx, "Cleaning MM context due to %s\n", log_text);
 
 	/* Mark MM state as deregistered */
-	ctx->mm_state = GMM_DEREGISTERED;
-
+	ctx->gmm_state = GMM_DEREGISTERED;
 	mmctx_set_pmm_state(ctx, PMM_DETACHED);
+	mmctx_set_pmm_state(ctx, MM_IDLE);
 
 	sgsn_mm_ctx_cleanup_free(ctx);
 }
@@ -882,7 +895,7 @@
 		memset(&sig_data, 0, sizeof(sig_data));
 		sig_data.mm = mmctx;
 		osmo_signal_dispatch(SS_SGSN, S_SGSN_ATTACH, &sig_data);
-		ctx->mm_state = GMM_REGISTERED_NORMAL;
+		ctx->gmm_state = GMM_REGISTERED_NORMAL;
 #endif
 
 		return gsm48_tx_gmm_att_ack(ctx);
@@ -921,7 +934,7 @@
 
 void gsm0408_gprs_access_granted(struct sgsn_mm_ctx *ctx)
 {
-	switch (ctx->mm_state) {
+	switch (ctx->gmm_state) {
 	case GMM_COMMON_PROC_INIT:
 		LOGMMCTXP(LOGL_NOTICE, ctx,
 		     "Authorized, continuing procedure, IMSI=%s\n",
@@ -941,7 +954,7 @@
 	if (gmm_cause == SGSN_ERROR_CAUSE_NONE)
 		gmm_cause = GMM_CAUSE_GPRS_NOTALLOWED;
 
-	switch (ctx->mm_state) {
+	switch (ctx->gmm_state) {
 	case GMM_COMMON_PROC_INIT:
 		LOGMMCTXP(LOGL_NOTICE, ctx,
 			  "Not authorized, rejecting ATTACH REQUEST "
@@ -1225,11 +1238,11 @@
 #ifdef PTMSI_ALLOC
 	/* Allocate a new P-TMSI (+ P-TMSI signature) and update TLLI */
 	/* Don't change the P-TMSI if a P-TMSI re-assignment is under way */
-	if (ctx->mm_state != GMM_COMMON_PROC_INIT) {
+	if (ctx->gmm_state != GMM_COMMON_PROC_INIT) {
 		ctx->p_tmsi_old = ctx->p_tmsi;
 		ctx->p_tmsi = sgsn_alloc_ptmsi();
 	}
-	ctx->mm_state = GMM_COMMON_PROC_INIT;
+	ctx->gmm_state = GMM_COMMON_PROC_INIT;
 #endif
 
 	if (ctx->ran_type == MM_CTX_T_GERAN_Gb) {
@@ -1500,10 +1513,10 @@
 				mmctx->ra.mcc, mmctx->ra.mnc,
 				mmctx->ra.lac, mmctx->ra.rac);
 
-			mmctx->mm_state = GMM_COMMON_PROC_INIT;
+			mmctx->gmm_state = GMM_COMMON_PROC_INIT;
 		}
 	} else if (!gprs_ra_id_equals(&mmctx->ra, &old_ra_id) ||
-		mmctx->mm_state == GMM_DEREGISTERED)
+		mmctx->gmm_state == GMM_DEREGISTERED)
 	{
 		/* We cannot use the mmctx */
 		LOGMMCTXP(LOGL_INFO, mmctx,
@@ -1545,7 +1558,7 @@
 
 #ifdef PTMSI_ALLOC
 	/* Don't change the P-TMSI if a P-TMSI re-assignment is under way */
-	if (mmctx->mm_state != GMM_COMMON_PROC_INIT) {
+	if (mmctx->gmm_state != GMM_COMMON_PROC_INIT) {
 		mmctx->p_tmsi_old = mmctx->p_tmsi;
 		mmctx->p_tmsi = sgsn_alloc_ptmsi();
 	}
@@ -1553,10 +1566,10 @@
 	mmctx->t3350_mode = GMM_T3350_MODE_RAU;
 	mmctx_timer_start(mmctx, 3350, sgsn->cfg.timers.T3350);
 
-	mmctx->mm_state = GMM_COMMON_PROC_INIT;
+	mmctx->gmm_state = GMM_COMMON_PROC_INIT;
 #else
 	/* Make sure we are NORMAL (i.e. not SUSPENDED anymore) */
-	mmctx->mm_state = GMM_REGISTERED_NORMAL;
+	mmctx->gmm_state = GMM_REGISTERED_NORMAL;
 
 	memset(&sig_data, 0, sizeof(sig_data));
 	sig_data.mm = mmctx;
@@ -1679,7 +1692,7 @@
 		goto rejected;
 	}
 
-	ctx->mm_state = GMM_COMMON_PROC_INIT;
+	ctx->gmm_state = GMM_COMMON_PROC_INIT;
 
 	ctx->iu.service.type = service_type;
 
@@ -1831,8 +1844,9 @@
 			gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff,
 					  mmctx->gb.tlli_new);
 		}
-		mmctx->mm_state = GMM_REGISTERED_NORMAL;
+		mmctx->gmm_state = GMM_REGISTERED_NORMAL;
 		mmctx_set_pmm_state(mmctx, PMM_CONNECTED);
+		mmctx_set_mm_state(mmctx, MM_READY);
 		rc = 0;
 
 		memset(&sig_data, 0, sizeof(sig_data));
@@ -1854,8 +1868,9 @@
 			gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff,
 					  mmctx->gb.tlli_new);
 		}
-		mmctx->mm_state = GMM_REGISTERED_NORMAL;
+		mmctx->gmm_state = GMM_REGISTERED_NORMAL;
 		mmctx_set_pmm_state(mmctx, PMM_CONNECTED);
+		mmctx_set_mm_state(mmctx, MM_READY);
 		rc = 0;
 
 		memset(&sig_data, 0, sizeof(sig_data));
@@ -2682,15 +2697,15 @@
 		return -EINVAL;
 	}
 
-	if (mmctx->mm_state != GMM_REGISTERED_NORMAL &&
-	    mmctx->mm_state != GMM_REGISTERED_SUSPENDED) {
+	if (mmctx->gmm_state != GMM_REGISTERED_NORMAL &&
+	    mmctx->gmm_state != GMM_REGISTERED_SUSPENDED) {
 		LOGMMCTXP(LOGL_NOTICE, mmctx, "SUSPEND request while state "
 			"!= REGISTERED (TLLI=%08x)\n", tlli);
 		return -EINVAL;
 	}
 
 	/* Transition from REGISTERED_NORMAL to REGISTERED_SUSPENDED */
-	mmctx->mm_state = GMM_REGISTERED_SUSPENDED;
+	mmctx->gmm_state = GMM_REGISTERED_SUSPENDED;
 	return 0;
 }
 
@@ -2708,8 +2723,8 @@
 		return -EINVAL;
 	}
 
-	if (mmctx->mm_state != GMM_REGISTERED_NORMAL &&
-	    mmctx->mm_state != GMM_REGISTERED_SUSPENDED) {
+	if (mmctx->gmm_state != GMM_REGISTERED_NORMAL &&
+	    mmctx->gmm_state != GMM_REGISTERED_SUSPENDED) {
 		LOGMMCTXP(LOGL_NOTICE, mmctx, "RESUME request while state "
 			"!= SUSPENDED (TLLI=%08x)\n", tlli);
 		/* FIXME: should we not simply ignore it? */
@@ -2717,7 +2732,7 @@
 	}
 
 	/* Transition from SUSPENDED to NORMAL */
-	mmctx->mm_state = GMM_REGISTERED_NORMAL;
+	mmctx->gmm_state = GMM_REGISTERED_NORMAL;
 	return 0;
 }
 
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index e85e1a9..3fb1104 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -222,7 +222,7 @@
 	memcpy(&ctx->ra, raid, sizeof(ctx->ra));
 	ctx->ran_type = MM_CTX_T_GERAN_Gb;
 	ctx->gb.tlli = tlli;
-	ctx->mm_state = GMM_DEREGISTERED;
+	ctx->gmm_state = GMM_DEREGISTERED;
 	ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL;
 	ctx->ciph_algo = sgsn->cfg.cipher;
 	LOGMMCTXP(LOGL_DEBUG, ctx, "Allocated with %s cipher.\n",
@@ -247,7 +247,7 @@
 	ctx->ran_type = MM_CTX_T_UTRAN_Iu;
 	ctx->iu.ue_ctx = uectx;
 	ctx->iu.new_key = 1;
-	ctx->mm_state = GMM_DEREGISTERED;
+	ctx->gmm_state = GMM_DEREGISTERED;
 	ctx->pmm_state = PMM_DETACHED;
 	ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL;
 	ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0);
@@ -658,7 +658,7 @@
 
 static void drop_one_pdp(struct sgsn_pdp_ctx *pdp)
 {
-	if (pdp->mm->mm_state == GMM_REGISTERED_NORMAL)
+	if (pdp->mm->gmm_state == GMM_REGISTERED_NORMAL)
 		gsm48_tx_gsm_deact_pdp_req(pdp, GSM_CAUSE_NET_FAIL);
 	else  {
 		/* FIXME: GPRS paging in case MS is SUSPENDED */
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index 072b9ba..062de44 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -676,7 +676,7 @@
 	msgb_bvci(msg) = mm->gb.bvci;
 	msgb_nsei(msg) = mm->gb.nsei;
 
-	switch (mm->mm_state) {
+	switch (mm->gmm_state) {
 	case GMM_REGISTERED_SUSPENDED:
 		/* initiate PS PAGING procedure */
 		memset(&pinfo, 0, sizeof(pinfo));
@@ -695,7 +695,7 @@
 		break;
 	default:
 		LOGP(DGPRS, LOGL_ERROR, "GTP DATA IND for TLLI %08X in state "
-			"%u\n", mm->gb.tlli, mm->mm_state);
+			"%u\n", mm->gb.tlli, mm->gmm_state);
 		msgb_free(msg);
 		return -1;
 	}
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index 4a97687..bbc2274 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -485,7 +485,7 @@
 		pfx, mm->msisdn, mm->gb.tlli, mm->hlr, VTY_NEWLINE);
 	vty_out(vty, "%s  MM State: %s, Routeing Area: %u-%u-%u-%u, "
 		"Cell ID: %u%s", pfx,
-		get_value_string(gprs_mm_st_strs, mm->mm_state),
+		get_value_string(gprs_mm_st_strs, mm->gmm_state),
 		mm->ra.mcc, mm->ra.mnc, mm->ra.lac, mm->ra.rac,
 		mm->gb.cell_id, VTY_NEWLINE);
 
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index e1fd2e7..bcda9a0 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -191,7 +191,7 @@
 
 	lle = gprs_lle_get_or_create(tlli, 3);
 	ctx = sgsn_mm_ctx_alloc(tlli, raid);
-	ctx->mm_state = GMM_REGISTERED_NORMAL;
+	ctx->gmm_state = GMM_REGISTERED_NORMAL;
 	ctx->gb.llme = lle->llme;
 
 	ictx = sgsn_mm_ctx_by_tlli(tlli, raid);
@@ -979,7 +979,7 @@
 
 	ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 
 	/* we expect an identity request (IMEI) */
 	OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -999,7 +999,7 @@
 	 * authorization */
 	OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 
 retry_attach_req:
 
@@ -1039,7 +1039,7 @@
 	send_0408_message(ctx->gb.llme, local_tlli, &raid,
 			  attach_compl, ARRAY_SIZE(attach_compl));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
@@ -1567,7 +1567,7 @@
 
 	ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 
 	/* we expect an identity request (IMEI) */
 	OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1587,7 +1587,7 @@
 	 * authorization */
 	OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 
 	/* we expect an attach accept/reject */
 	OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1601,7 +1601,7 @@
 	send_0408_message(ctx->gb.llme, foreign_tlli, &raid,
 			  attach_compl, ARRAY_SIZE(attach_compl));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
@@ -1715,7 +1715,7 @@
 
 	ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 	ptmsi1 = ctx->p_tmsi;
 
@@ -1732,7 +1732,7 @@
 	 * authorization */
 	OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 
 	/* we expect an attach accept */
@@ -1747,7 +1747,7 @@
 	/* the allocated P-TMSI should be the same */
 	ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi_old == old_ptmsi);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 
@@ -1764,7 +1764,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 
@@ -1777,7 +1777,7 @@
 	/* we expect an RA update accept */
 	OSMO_ASSERT(sgsn_tx_counter == 1);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -1792,7 +1792,7 @@
 	received_ptmsi = get_new_ptmsi(&last_dl_parse_ctx);
 	OSMO_ASSERT(received_ptmsi == ptmsi2);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi2);
 
@@ -1804,7 +1804,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi2);
 
@@ -1940,7 +1940,7 @@
 
 	ctx = sgsn_mm_ctx_by_tlli(ms_tlli, &raid1);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 
 	/* we expect an identity request (IMEI) */
@@ -1956,7 +1956,7 @@
 	 * authorization */
 	OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(ms_tlli, &raid1));
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 
 	/* we expect an attach accept */
 	OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1975,7 +1975,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 
@@ -1990,7 +1990,7 @@
 	OSMO_ASSERT(last_dl_parse_ctx.g48_hdr->msg_type == GSM48_MT_GMM_RA_UPD_ACK);
 	// OSMO_ASSERT(last_dl_parse_ctx.tlli == ms_tlli);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -2007,7 +2007,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 	OSMO_ASSERT(ctx->gb.tlli == ms_tlli);
@@ -2052,7 +2052,7 @@
 
 	ctx = sgsn_mm_ctx_by_tlli(ms_tlli, &raid2);
 	OSMO_ASSERT(ctx != NULL);
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 
 	/* we expect an attach accept */
@@ -2075,7 +2075,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 
@@ -2089,7 +2089,7 @@
 	OSMO_ASSERT(sgsn_tx_counter == 1);
 	OSMO_ASSERT(last_dl_parse_ctx.g48_hdr->msg_type == GSM48_MT_GMM_RA_UPD_ACK);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+	OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
 	OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
 	OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
 	OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -2106,7 +2106,7 @@
 	/* we don't expect a response */
 	OSMO_ASSERT(sgsn_tx_counter == 0);
 
-	OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+	OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
 	OSMO_ASSERT(ctx->p_tmsi_old == 0);
 	OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
 	OSMO_ASSERT(ctx->gb.tlli == ms_tlli);

-- 
To view, visit https://gerrit.osmocom.org/1754
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cfdcf921e4ebd14a5e7ce7489ec4ce5d1f5515f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list