mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-19 14:54:28 +08: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:
@ -488,6 +488,8 @@ BaseType_t xGivingUp = pdFALSE;
|
|||||||
|
|
||||||
case eLeasedAddress :
|
case eLeasedAddress :
|
||||||
|
|
||||||
|
if( FreeRTOS_IsNetworkUp() )
|
||||||
|
{
|
||||||
/* Resend the request at the appropriate time to renew the lease. */
|
/* Resend the request at the appropriate time to renew the lease. */
|
||||||
prvCreateDHCPSocket();
|
prvCreateDHCPSocket();
|
||||||
|
|
||||||
@ -501,6 +503,11 @@ BaseType_t xGivingUp = pdFALSE;
|
|||||||
/* From now on, we should be called more often */
|
/* From now on, we should be called more often */
|
||||||
vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD );
|
vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vIPReloadDHCPTimer( pdMS_TO_TICKS( dhcpINITIAL_DHCP_TX_PERIOD ) );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eNotUsingLeasedAddress:
|
case eNotUsingLeasedAddress:
|
||||||
|
Reference in New Issue
Block a user