pothosware / SoapySDR

Vendor and platform neutral SDR support library.

Home Page:https://github.com/pothosware/SoapySDR/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reading settings option list (getSettingInfo) fails using C if no option names set

ahopper opened this issue · comments

if the settings optionNames is not populated this

out.optionNames = toStrArray(info.optionNames, &out.numOptions);

resets the numOptions to 0 so the C api cannot see the options.

the lime driver has an example of not setting optionNames

https://github.com/myriadrf/LimeSuite/blob/e829d3ede6222c1c0fc0e90dcd2050e50569e33d/SoapyLMS7/Settings.cpp#L802-L807

Just swappig the toStrArray() call order for out.options and out.optionNames should work right?
With options last it will take precedence over the result from optionNames -- a comment to the intention is then also needed ;)
Do you want to PR this change?

Yep that should work, I'm happy to create a PR.