xiaoxiang781216 commented on code in PR #1312: URL: https://github.com/apache/incubator-nuttx-apps/pull/1312#discussion_r964707301
########## netutils/dhcpc/dhcpc.c: ########## @@ -703,6 +705,8 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) */ retries = 0; + last_send = 0; Review Comment: remove last_send ########## netutils/dhcpc/dhcpc.c: ########## @@ -720,13 +724,18 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) /* Send the DISCOVER command */ - ninfo("Broadcast DISCOVER\n"); - if (dhcpc_sendmsg(pdhcpc, presult, DHCPDISCOVER) < 0) + if (last_send == 0 || Review Comment: don't need changedhcp_send since it is impossible to block for long time.. ########## netutils/dhcpc/dhcpc.c: ########## @@ -767,6 +776,14 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) return ERROR; } + + current = clock(); + + if (TICK2MSEC(current - last_send) > Review Comment: ```suggestion if (TICK2MSEC(clock() - current ) > ``` ########## netutils/dhcpc/dhcpc.c: ########## @@ -783,6 +800,8 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) */ retries = 0; + last_send = 0; Review Comment: apply the same change in following code. -- 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