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.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9977 )
Change subject: ctrl: Fix parsing of ERROR recvd msgs with id=err
......................................................................
ctrl: Fix parsing of ERROR recvd msgs with id=err
Our implementation generates ERROR CTRL messages with ID=error when it
is unable to parse a CMD. However, it doesn't account for them when
trying to receive and parse this kind of message. As a result, it will
return an ERROR message with a different description. This commit fixes
the old behaviour to success at parsing and returning the received
description to the caller.
Change-Id: I564ab1a7e845388f87accda44fbf165e5adc2480
---
M src/ctrl/control_cmd.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Harald Welte: Looks good to me, approved
Neels Hofmeyr: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index c5924b2..14ff906 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -362,7 +362,8 @@
goto err;
}
- if (!id_str_valid(tmp)) {
+ if (!id_str_valid(tmp) &&
+ !(cmd->type == CTRL_TYPE_ERROR && strcmp(tmp, "err") == 0)) {
LOGP(DLCTRL, LOGL_NOTICE, "Invalid %s message ID number: \"%s\"\n",
get_value_string(ctrl_type_vals, cmd->type), osmo_escape_str(tmp, -1));
cmd->type = CTRL_TYPE_ERROR;
--
To view, visit https://gerrit.osmocom.org/9977
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I564ab1a7e845388f87accda44fbf165e5adc2480
Gerrit-Change-Number: 9977
Gerrit-PatchSet: 3
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180712/7a779482/attachment.htm>