Change in ...osmo-sgsn[master]: sgsn_vty: Print correct Iu mmctx id in 'show mm-context'

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Sep 2 10:07:33 UTC 2019


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

Change subject: sgsn_vty: Print correct Iu mmctx id in 'show mm-context'
......................................................................

sgsn_vty: Print correct Iu mmctx id in 'show mm-context'

Change-Id: I79333bef4a4bf743fcad07812c9a213b368ff2b6
---
M src/gprs/sgsn_vty.c
1 file changed, 14 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 0663131..1f7874f 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -525,10 +525,23 @@
 static void vty_dump_mmctx(struct vty *vty, const char *pfx,
 			   struct sgsn_mm_ctx *mm, int pdp)
 {
+	uint32_t id = 0;
+
+	switch(mm->ran_type) {
+	case MM_CTX_T_UTRAN_Iu:
+#if BUILD_IU
+		id = mm->iu.ue_ctx->conn_id;
+#endif
+		break;
+	case MM_CTX_T_GERAN_Gb:
+		id = mm->gb.tlli;
+		break;
+	}
+
 	vty_out(vty, "%sMM Context for IMSI %s, IMEI %s, P-TMSI %08x%s",
 		pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE);
 	vty_out(vty, "%s  MSISDN: %s, TLLI: %08x%s HLR: %s",
-		pfx, mm->msisdn, mm->gb.tlli, mm->hlr, VTY_NEWLINE);
+		pfx, mm->msisdn, id, mm->hlr, VTY_NEWLINE);
 	vty_out(vty, "%s  MM State: %s, Routeing Area: %s, Cell ID: %u%s",
 		pfx, get_value_string(gprs_mm_st_strs, mm->gmm_state),
 		osmo_rai_name(&mm->ra), mm->gb.cell_id, VTY_NEWLINE);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I79333bef4a4bf743fcad07812c9a213b368ff2b6
Gerrit-Change-Number: 15355
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
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/28dbaa06/attachment.htm>


More information about the gerrit-log mailing list