From bd3de187e88a54767537db24f9ebf3d809aa99f0 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 12 Jul 2018 19:02:28 +0200 Subject: ctrl: Avoid sending back received ERROR msgs Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb --- src/osmo-bsc/osmo_bsc_ctrl.c | 5 +++-- 1 file 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 */ -- cgit v1.2.3