golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
65 stars 20 forks source link

samples: common: simplify net_connect() usage and implementation #437

Closed mniestroj closed 8 months ago

mniestroj commented 8 months ago

Checking for CONFIG_GOLIOTH_SAMPLES_COMMON=y is pointless, since all samples enable it in prj.conf. Call net_connect() unconditionally instead.

In case of CONFIG_NET_CONFIG_NEED_IPV4=y Zephyr networking subsystem initialization code already takes care about configuring IP layer and making sure there is assigned IPv4 address before reaching main() function. Make net_connect() a noop in that case, as no more networking setup is needed.

github-actions[bot] commented 8 months ago

Visit the preview URL for this PR (updated for commit ad5dc6f):

https://golioth-zephyr-sdk-doxygen-dev--pr437-simplify-net-con-vn46r8jj.web.app

(expires Thu, 19 Oct 2023 14:01:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49