Change in osmo-bsc[master]: ctrl: Avoid sending back received ERROR msgs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Jul 12 17:02:49 UTC 2018


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 <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180712/927d5087/attachment.htm>


More information about the gerrit-log mailing list