Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/9982 ) Change subject: ctrl: Avoid sending back received ERROR msgs .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 22 Jul 2018 06:23:00 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9982 ) Change subject: ctrl: Avoid sending back received ERROR msgs .. ctrl: Avoid sending back received ERROR msgs Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb --- M src/osmo-bsc/osmo_bsc_ctrl.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Neels Hofmeyr: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 13cf98d..77087c5 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -110,16 +110,17 @@ int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg) { struct ctrl_cmd *cmd; + bool parse_failed; int rc; /* caller has already ensured ipaccess_head + ipaccess_head_ext */ OSMO_ASSERT(msg->l2h); /* prase raw (ASCII) CTRL command into ctrl_cmd */ - cmd = ctrl_cmd_parse2(asp, msg); + cmd = ctrl_cmd_parse3(asp, msg, _failed); OSMO_ASSERT(cmd); msgb_free(msg); - if (cmd->type == CTRL_TYPE_ERROR) + if (cmd->type == CTRL_TYPE_ERROR && parse_failed) goto send_reply; /* handle the CTRL command */ -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9982 ) Change subject: ctrl: Avoid sending back received ERROR msgs .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/9982/1/src/osmo-bsc/osmo_bsc_ctrl.c File src/osmo-bsc/osmo_bsc_ctrl.c: https://gerrit.osmocom.org/#/c/9982/1/src/osmo-bsc/osmo_bsc_ctrl.c@123 PS1, Line 123: if (cmd->type == CTRL_TYPE_ERROR && parse_failed) > (parse_failed always comes with CTRL_TYPE_ERROR, right?) Yes, API wise only makes sense if cmd->type=ERROR is returned. -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 12 Jul 2018 18:47:49 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/9982 ) Change subject: ctrl: Avoid sending back received ERROR msgs .. Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/9982/1/src/osmo-bsc/osmo_bsc_ctrl.c File src/osmo-bsc/osmo_bsc_ctrl.c: https://gerrit.osmocom.org/#/c/9982/1/src/osmo-bsc/osmo_bsc_ctrl.c@123 PS1, Line 123: if (cmd->type == CTRL_TYPE_ERROR && parse_failed) (parse_failed always comes with CTRL_TYPE_ERROR, right?) -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 12 Jul 2018 18:32:44 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9982 ) Change subject: ctrl: Avoid sending back received ERROR msgs .. Patch Set 1: Requires libosmocore https://gerrit.osmocom.org/#/c/libosmocore/+/9978/ to build correctly. -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 12 Jul 2018 17:03:00 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs
Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/9982 Change subject: ctrl: Avoid sending back received ERROR msgs .. ctrl: Avoid sending back received ERROR msgs Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb --- M src/osmo-bsc/osmo_bsc_ctrl.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/82/9982/1 diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 13cf98d..77087c5 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -110,16 +110,17 @@ int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg) { struct ctrl_cmd *cmd; + bool parse_failed; int rc; /* caller has already ensured ipaccess_head + ipaccess_head_ext */ OSMO_ASSERT(msg->l2h); /* prase raw (ASCII) CTRL command into ctrl_cmd */ - cmd = ctrl_cmd_parse2(asp, msg); + cmd = ctrl_cmd_parse3(asp, msg, _failed); OSMO_ASSERT(cmd); msgb_free(msg); - if (cmd->type == CTRL_TYPE_ERROR) + if (cmd->type == CTRL_TYPE_ERROR && parse_failed) goto send_reply; /* handle the CTRL command */ -- To view, visit https://gerrit.osmocom.org/9982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb Gerrit-Change-Number: 9982 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol