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, &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: newchange
Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb
Gerrit-Change-Number: 9982
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to