eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
230 stars 131 forks source link

Wrong caller checking in nx_dhcp_state_change_notify #165

Closed OortJacek closed 1 year ago

OortJacek commented 1 year ago

https://github.com/azure-rtos/netxduo/blob/939bae5c4dafde45988d593285f444702ed9be0c/addons/dhcp/nxd_dhcp_client.c#L3602

Cannot set the DHCP's notify function from the initialization. The documentation says that it is allowed to call this function from the initialization. See: https://learn.microsoft.com/en-us/azure/rtos/netx/netx-dhcp-client/chapter3#allowed-from-24

Furthermore, all other functions that set notify functions are allowed from the initialization.

It should be: NX_INIT_AND_THREADS_CALLER_CHECKING

TrumsZ commented 1 year ago

Hello, thank you for your suggestion. We will take a look at it.

bo-ms commented 1 year ago

Closing. The caller checking has been corrected in this commit: https://github.com/azure-rtos/netxduo/commit/5b5c8c580684cd2f85001ff1763a62e0fdac9452#diff-474e87983b8ff48b783265e25bf5b6f5320d2460339a1bd29e22ae3e452b1cf8