nuttxs commented on code in PR #3131: URL: https://github.com/apache/nuttx-apps/pull/3131#discussion_r2204382739
########## netutils/dhcpc/dhcpc.c: ########## @@ -950,3 +968,107 @@ int dhcpc_request_async(FAR void *handle, dhcpc_callback_t callback) return OK; } + +/**************************************************************************** + * Name: dhcpc_release + ****************************************************************************/ + +int dhcpc_release(FAR void *handle, FAR struct dhcpc_state *presult) +{ + FAR struct dhcpc_state_s *pdhcpc = (FAR struct dhcpc_state_s *)handle; + int ret; + int send_attempts = 0; + const int max_attempts = CONFIG_NETUTILS_DHCPC_RELEASE_RETRIES; Review Comment: Different usage scenarios: CONFIG_NETUTILS_DHCPC_RETRIES: Used for retries in DHCP interactions with responses. (Operations with responses may require more retries (to wait for network and server responses) CONFIG_NETUTILS_DHCPC_RELEASE_RETRIES: Used for send retries in non-responsive cases. (Non-responsive operations usually only need a small number of retries (to ensure successful sending) ########## netutils/dhcpc/dhcpc.c: ########## @@ -87,6 +87,14 @@ #define DHCPNAK 6 #define DHCPRELEASE 7 +#ifndef CONFIG_NETUTILS_DHCPC_RELEASE_RETRIES +#define CONFIG_NETUTILS_DHCPC_RELEASE_RETRIES 3 +#endif + +#ifndef CONFIG_NETUTILS_DHCPC_RELEASE_TRANSMISSION_DELAY_MS +#define CONFIG_NETUTILS_DHCPC_RELEASE_TRANSMISSION_DELAY_MS 10 +#endif Review Comment: The modifications have been completed. Please help review -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org