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
This commit is contained in:
parent
3d603034a9
commit
4d0066ceb6
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue