Code review comment for ~dirk.zimoch/epics-base:chfPluginImprovements

Revision history for this message
Dirk Zimoch (dirk.zimoch) wrote :

I have added a check that the "extra-short form" is not followed by garbage. (And wrote tests for it.) It only accepts , or } now. It never crashed before but had accepted any separator like ; or # and did not check for closing }. That is fixed now.

The error message if } is missing is:
dbChannelCreate: parse error: premature EOF

If garbarge follows instead or a comma, the error is:
dbChannelCreate: lexical error: invalid char in json text.

These are exactly the same error one gets with the "long form" using :{}

Whitespace around the comma are possible just as usual.

---

I could not find a clever way to properly type check chfPluginArgString for char* vs char[] (without writing a new API in C++). Thus I will keep old chfPluginArgString and new chfPluginArgStringAlloc.

« Back to merge proposal