<p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p><a href="https://gerrit.osmocom.org/9978">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/9978">change 9978</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9978"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ide9170e5c31967c353f8fe4e8227e64130b91eae </div>
<div style="display:none"> Gerrit-Change-Number: 9978 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 13 Jul 2018 10:05:16 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>