apache / nuttx-apps

Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
https://nuttx.apache.org/
Apache License 2.0
268 stars 504 forks source link

dhcpc: reset the state of the "cancel" variable when restarting the async dhcpc thread #2334

Closed slorquet closed 5 months ago

slorquet commented 5 months ago

Summary

dhcpc can run in async mode with a background thread. this can be cancelled (when the link goes down)

but when the link goes up again the variable dhcpc_state->cancel is not reinitialized, so the async mode works only once

Impact

dhcpc async thread can be started multiple times

Testing

verified to work experimentally on a stm32f4 custom board

slorquet commented 5 months ago

Hi, can you apply this as soon as checks complete? I have more changes to send, I would like to avoid parallel pull requests, thanks.

xiaoxiang781216 commented 5 months ago

Hi, can you apply this as soon as checks complete? I have more changes to send, I would like to avoid parallel pull requests, thanks.

It's better to create pull request parallel If you change is independent each other. All committers come from the different time zone and have daily job to be done in the working time.

slorquet commented 5 months ago

yes of course, I do that always. but having to manage several pending changes in parallel breaks my brain a little.