libosmocore/src/ctrl
Neels Hofmeyr f2e83ad40d add ctrl_cmd_parse2() to return parsing errors
If a control command fails to parse, we so far discard specific error messages
and instead send just "Command parser error".

In ctrl_cmd_parse() we actually compose detailed error replies, but in the end
simply talloc_free() them and return NULL.

A first step to report these errors to the ctrl command issuer is to not return
NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add
ctrl_cmd_parse2() to return such instead of NULL.

To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors.
ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper
around ctrl_cmd_parse2() which discards the cmd on error.

No need really to deprecate ctrl_cmd_parse() yet; especially as long as
compiler warnings might break jenkins builds.

Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880
2017-12-18 23:05:50 +00:00
..
Makefile.am Move additional libraries to appropriate place 2017-10-30 13:50:31 +01:00
control_cmd.c add ctrl_cmd_parse2() to return parsing errors 2017-12-18 23:05:50 +00:00
control_if.c ctrl: fix mem leak when handling GET_REPLY and SET_REPLY 2017-12-18 23:05:50 +00:00
control_vty.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
fsm_ctrl_commands.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00