mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-18 02:37:47 -04:00
FreeRTOS+TCP : renewing DHCP lease while network is down (#53)
Co-authored-by: Hein Tibosch <hein@htibosch.net> Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
This commit is contained in:
parent
d95624c5d6
commit
5003d17fed
1 changed files with 17 additions and 10 deletions
|
@ -488,6 +488,8 @@ BaseType_t xGivingUp = pdFALSE;
|
|||
|
||||
case eLeasedAddress :
|
||||
|
||||
if( FreeRTOS_IsNetworkUp() )
|
||||
{
|
||||
/* Resend the request at the appropriate time to renew the lease. */
|
||||
prvCreateDHCPSocket();
|
||||
|
||||
|
@ -501,6 +503,11 @@ BaseType_t xGivingUp = pdFALSE;
|
|||
/* From now on, we should be called more often */
|
||||
vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vIPReloadDHCPTimer( pdMS_TO_TICKS( dhcpINITIAL_DHCP_TX_PERIOD ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case eNotUsingLeasedAddress:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue