aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-15 01:28:35 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-15 13:13:50 +0700
commit463005e24678a4a87a5d9ce729b6097d3c1791f9 (patch)
tree61d255f74c78bb42daf9b947ded0a8c9f5be6f3b
parent4d0066ceb6d3b0a8caab3bc81d18b27aa0784041 (diff)
gsup_client_mux_tx_error_reply(): fix: do not omit session IEs
For SS/USSD, it's important to have both session state and ID IEs. Found using the new TC_mt_ussd_for_unknown_subscr test case. Change-Id: I57317a7b8036d1ffd36e2021efc146db4633da84 Related: (TTCN-3) Id35cd3ec15d1bab15260312d7bbb41e2d10349fe Related: OS#2931
-rw-r--r--src/libmsc/gsup_client_mux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmsc/gsup_client_mux.c b/src/libmsc/gsup_client_mux.c
index 292c2a91d..8c80a6b35 100644
--- a/src/libmsc/gsup_client_mux.c
+++ b/src/libmsc/gsup_client_mux.c
@@ -157,6 +157,12 @@ void gsup_client_mux_tx_error_reply(struct gsup_client_mux *gcm, const struct os
OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi);
+ /* For SS/USSD, it's important to keep both session state and ID IEs */
+ if (gsup_orig->session_state != OSMO_GSUP_SESSION_STATE_NONE) {
+ gsup_reply.session_state = OSMO_GSUP_SESSION_STATE_END;
+ gsup_reply.session_id = gsup_orig->session_id;
+ }
+
if (osmo_gsup_client_enc_send(gcm->gsup_client, &gsup_reply))
LOGP(DLGSUP, LOGL_ERROR, "Failed to send Error reply (imsi=%s)\n",
osmo_quote_str(gsup_orig->imsi, -1));