Change in libosmocore[master]: ctrl: Introduce ctrl_cmd_parse3 API

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
Fri Jul 13 10:05:16 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9978 )

Change subject: ctrl: Introduce ctrl_cmd_parse3 API
......................................................................


Patch Set 2:

While I first like the idea, it has some drawbacks which pushes me back. Basically because errors can happen at different stages during parsing, which means sometimes you can acquire the ID while sometimes you cannot, so it's not only the error message type you want to return but also the ID if available, so you can route back the error to match the corresponding request on the other side. So at the end, returning a filled in cmd is handy in order not to loose information.

Another option would be differentiating the parsing errors from received errors by using a different cmd->type, like using type=CTRL_TYPE_UNKNOWN, but that would require to change logic of all users of the CTRL iface since it would need to account for a new type instead of just extending it like done in this commit.

So while I agree that I would probably have taken the patch to have a different cmd->type for parse errors, I think it's easier and handy to keep current API and only extend it with this parse_failed flag.


-- 
To view, visit https://gerrit.osmocom.org/9978
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide9170e5c31967c353f8fe4e8227e64130b91eae
Gerrit-Change-Number: 9978
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Fri, 13 Jul 2018 10:05:16 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180713/27e4dbbf/attachment.htm>


More information about the gerrit-log mailing list