summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-12 18:54:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-07-12 20:46:37 +0200
commitde4418fb8e5a27f65b575b200763cfe06224d405 (patch)
treee2eafc2cab4a622eedfddfb331df7f868022cf29 /openbsc
parentb956d323865da7958654bb12de84c24783174bfc (diff)
bsc: ctrl: Avoid sending back received ERROR msgs
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 4395c3bfa..b179ff17f 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -224,9 +224,10 @@ static void handle_ctrl(struct bsc_msc_data *msc, struct msgb *msg)
{
int ret;
struct ctrl_cmd *cmd;
+ bool parse_failed;
- cmd = ctrl_cmd_parse2(msc->msc_con, msg);
- if (cmd->type == CTRL_TYPE_ERROR) {
+ cmd = ctrl_cmd_parse3(msc->msc_con, msg, &parse_failed);
+ if (cmd->type == CTRL_TYPE_ERROR && parse_failed) {
LOGP(DMSC, LOGL_ERROR, "Failed to parse control message.\n");
ctrl_cmd_send(&msc->msc_con->write_queue, cmd);