Revision: 18231
          http://sourceforge.net/p/edk2/code/18231
Author:   jiaxinwu
Date:     2015-08-18 03:08:27 +0000 (Tue, 18 Aug 2015)
Log Message:
-----------
NetworkPkg: Stop and release DHCP4 child after boot info is ready

HttpBootDxe need to stop and release the DHCP4 child when it's
not used so the NBP could create new DHCP4 child and use it.

Cc: Ye Ting <[email protected]>
Cc: Zhang Lubo <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ye Ting <[email protected]>

Modified Paths:
--------------
    trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootImpl.c

Modified: trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootImpl.c
===================================================================
--- trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootImpl.c    2015-08-18 02:52:32 UTC 
(rev 18230)
+++ trunk/edk2/NetworkPkg/HttpBootDxe/HttpBootImpl.c    2015-08-18 03:08:27 UTC 
(rev 18231)
@@ -244,6 +244,12 @@
   Private->SelectProxyType = HttpOfferTypeMax;
 
   if (!Private->UsingIpv6) {
+    //
+    // Stop and release the DHCP4 child.
+    //
+    Private->Dhcp4->Stop (Private->Dhcp4);
+    Private->Dhcp4->Configure (Private->Dhcp4, NULL);
+
     for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
       if (Private->OfferBuffer[Index].Dhcp4.UriParser) {
         HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp4.UriParser);
@@ -338,6 +344,12 @@
 
   if (Status != EFI_SUCCESS && Status != EFI_BUFFER_TOO_SMALL) {
     HttpBootStop (Private);
+  } else {
+    //
+    // Stop and release the DHCP4 child.
+    //
+    Private->Dhcp4->Stop (Private->Dhcp4);
+    Private->Dhcp4->Configure (Private->Dhcp4, NULL);
   }
 
   return Status;


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to