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, &parse_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 <pes...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to