Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue May 7 17:47:16 UTC 2019


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13898 )

Change subject: hlr.c: fix: properly print the original message type in read_cb_forward()
......................................................................

hlr.c: fix: properly print the original message type in read_cb_forward()

Printing 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' in routing error messages
instead of the original message type may be confusing. Let's store
the original message type, and change just before sending.

Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5
Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39
---
M src/hlr.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved



diff --git a/src/hlr.c b/src/hlr.c
index 38422c8..3df700a 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -465,7 +465,7 @@
 	gsup_err->message_class = gsup->message_class;
 	gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len);
 	gsup_err->destination_name_len = gsup->destination_name_len;
-	gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR;
+	gsup_err->message_type = gsup->message_type;
 	gsup_err->session_state = gsup->session_state;
 	gsup_err->session_id = gsup->session_id;
 	gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len);
@@ -508,6 +508,7 @@
 	if (ret) {
 		struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP forward ERR response");
 		OSMO_ASSERT(msg_err);
+		gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR;
 		osmo_gsup_encode(msg_err, gsup_err);
 		LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type));
 		osmo_gsup_conn_send(conn, msg_err);

-- 
To view, visit https://gerrit.osmocom.org/13898
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39
Gerrit-Change-Number: 13898
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190507/a0766a04/attachment.html>


More information about the gerrit-log mailing list