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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jul 22 06:23:02 UTC 2018


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb
Gerrit-Change-Number: 9982
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180722/8037b762/attachment.htm>


More information about the gerrit-log mailing list