/* Terminate the current address acquire. All the allocated resources are released. Be careful when calling this function. A rule related to this is: only call DhcpEndSession at the highest level, such as DhcpInput, DhcpOnTimerTick...At the other level, just return error. */
VOID DhcpEndSession(IN DHCP_SERVICE *DhcpSb, IN EFI_STATUS Status)
/* Terminate the current address acquire. All the allocated resources are released. Be careful when calling this function. A rule related to this is: only call DhcpEndSession at the highest level, such as DhcpInput, DhcpOnTimerTick...At the other level, just return error. */
VOID DhcpEndSession(IN DHCP_SERVICE *DhcpSb, IN EFI_STATUS Status)
{
  if (DHCP_CONNECTED (DhcpSb->DhcpState)) {
    DhcpCallUser (DhcpSb, Dhcp4AddressLost, NULL, NULL);
  } else {
    DhcpCallUser (DhcpSb, Dhcp4Fail, NULL, NULL);
  }
  DhcpCleanLease (DhcpSb);
  DhcpSb->IoStatus = Status;
  DhcpNotifyUser (DhcpSb, DHCP_NOTIFY_ALL);
}