summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-16 01:12:35 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-18 23:05:50 +0000
commitc0b0b623053f16790d7d675812befe382ebdfd6e (patch)
treec53db24db8dd13b122cf033050fecf86acef25fd /tests
parentf2e83ad40d231e87e2604ec4c97c810a8182e145 (diff)
ctrl: on parse errors, return a detailed message to sender
The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send those back to the CTRL command sender as reply. Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2() should return NULL, which shouldn't actually happen at all. Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d
Diffstat (limited to 'tests')
-rw-r--r--tests/ctrl/ctrl_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index b1d4f237..39ec61a8 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -76,7 +76,7 @@ static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon,
printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1));
printf("parsing:\n");
- cmd = ctrl_cmd_parse(ctx, msg);
+ cmd = ctrl_cmd_parse2(ctx, msg);
OSMO_ASSERT(cmd);
OSMO_ASSERT(t->expect_parsed.type == cmd->type);