aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-15 01:08:16 +0700
committerlaforge <laforge@gnumonks.org>2019-06-14 21:51:49 +0000
commit4d0066ceb6d3b0a8caab3bc81d18b27aa0784041 (patch)
treec8c3388655a72c75739ffab9e791654488b1d684 /src/libmsc
parent3d603034a9dce948e8868f356853da04b72376b4 (diff)
gsup_client_mux_tx_error_reply(): fix: do not override IMSI
I am not a big fan of using such syntax sugar for initializing structures, and this is one of the reasons: it's much easier to shoot yourself in the foot. IMSI was copied to the new GSUP message, but then overridden. Found using the new TC_mt_ussd_for_unknown_subscr test case. Change-Id: If81c3fa56951185339f33a523ab6364594101be1 Related: (TTCN-3) Id35cd3ec15d1bab15260312d7bbb41e2d10349fe Related: OS#2931
Diffstat (limited to 'src/libmsc')
-rw-r--r--src/libmsc/gsup_client_mux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmsc/gsup_client_mux.c b/src/libmsc/gsup_client_mux.c
index 7ec1712e7..292c2a91d 100644
--- a/src/libmsc/gsup_client_mux.c
+++ b/src/libmsc/gsup_client_mux.c
@@ -150,13 +150,13 @@ void gsup_client_mux_tx_error_reply(struct gsup_client_mux *gcm, const struct os
if (!OSMO_GSUP_IS_MSGT_REQUEST(gsup_orig->message_type))
return;
- OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi);
-
gsup_reply = (struct osmo_gsup_message){
.cause = cause,
.message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type),
};
+ OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi);
+
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));