aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-30 17:48:10 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-02 11:44:58 +0200
commit9119d50849b8c4efa7a2074ff004c3a671e8c13f (patch)
tree91de318f4e560eee97136efeee23597aee89d3aa
parent3b848bdc426ce236005a11ee13970fd4b57e8032 (diff)
sgsn_vty: Print correct Iu mmctx id in 'show mm-context'
-rw-r--r--src/gprs/sgsn_vty.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 066313163..1f7874fc4 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -525,10 +525,23 @@ static void vty_dump_pdp(struct vty *vty, const char *pfx,
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);