Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...
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 Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol
Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() .. Patch Set 1: Code-Review+2 -- 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: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:44:05 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c@502 PS1, Line 502: LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); > Why not using gsup here instead of gsup_err, and then moving all gsup_err > allocation after "end" tag […] because msg is already deallocated when we reach here -- 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: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:43:03 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c@502 PS1, Line 502: LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); Why not using gsup here instead of gsup_err, and then moving all gsup_err allocation after "end" tag? -- 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: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:18:09 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa...
Vadim Yanitskiy has uploaded this change for review. ( 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(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/13898/1 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: newchange Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy