aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_ctrl.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-12 19:02:28 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-22 06:23:01 +0000
commitbd3de187e88a54767537db24f9ebf3d809aa99f0 (patch)
treee38ffdfc3756f196ac526347ebffad5b2215f6e2 /src/osmo-bsc/osmo_bsc_ctrl.c
parent5bc43cd107597b78f701f77c7fd4cce8f923dce5 (diff)
ctrl: Avoid sending back received ERROR msgs
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_ctrl.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_ctrl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c
index 13cf98dce..77087c51a 100644
--- a/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -110,16 +110,17 @@ static int sccplite_msc_ctrl_cmd_send(struct bsc_msc_data *msc, struct ctrl_cmd
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 */