fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14452


Change subject: gsup_client_mux_tx_error_reply(): fix: do not override IMSI
......................................................................

gsup_client_mux_tx_error_reply(): fix: do not override IMSI

I am not a big fun 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
---
M src/libmsc/gsup_client_mux.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/52/14452/1

diff --git a/src/libmsc/gsup_client_mux.c b/src/libmsc/gsup_client_mux.c
index 7ec1712..292c2a9 100644
--- a/src/libmsc/gsup_client_mux.c
+++ b/src/libmsc/gsup_client_mux.c
@@ -150,13 +150,13 @@
        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));

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: If81c3fa56951185339f33a523ab6364594101be1
Gerrit-Change-Number: 14452
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilira...@gmail.com>
Gerrit-MessageType: newchange

Reply via email to