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
This commit is contained in:
Vadim Yanitskiy 2019-06-15 01:28:35 +07:00
parent 4d0066ceb6
commit 463005e246
1 changed files with 6 additions and 0 deletions

View File

@ -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));