Revision: 18048
          http://sourceforge.net/p/edk2/code/18048
Author:   jljusten
Date:     2015-07-26 08:03:20 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
MdeModulePkg: Remove TransmitReceive() and ActiveChild dependency

Fix git 59a8cfd4 (SVN r17869) removes DHCP4.TransmitReceive()and DORA
process dependency, but it updated TransmitReceive() to take the ownership
of DhcpSb->ActiveChild but never release it. This will break the retransmit
and lease time out counter of DORA.
To fix that, TransmitReceive() doesn't need to be the ActiveChild, and the
timer routine should be updated to handle the TransmitReceive specially.

Cc: Fu Siyuan <[email protected]>
Cc: Ye Ting <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/17869

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c
    trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c

Modified: trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c      
2015-07-26 08:03:15 UTC (rev 18047)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c      
2015-07-26 08:03:20 UTC (rev 18048)
@@ -1494,7 +1494,6 @@
 
   Instance = DHCP_INSTANCE_FROM_THIS (This);
   DhcpSb   = Instance->Service;
-  DhcpSb->ActiveChild = Instance;
 
   if (Instance->Token != NULL) {
     //

Modified: trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c        
2015-07-26 08:03:15 UTC (rev 18047)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c        
2015-07-26 08:03:20 UTC (rev 18048)
@@ -1518,6 +1518,8 @@
   IN VOID                   *Context
   )
 {
+  LIST_ENTRY                *Entry;
+  LIST_ENTRY                *Next;
   DHCP_SERVICE              *DhcpSb;
   DHCP_PROTOCOL             *Instance;
   EFI_STATUS                Status;
@@ -1665,10 +1667,17 @@
   }
 
 ON_EXIT:
-  if ((Instance != NULL) && (Instance->Token != NULL)) {
-    Instance->Timeout--;
-    if (Instance->Timeout == 0) {
-      PxeDhcpDone (Instance);
+  //
+  // Iterate through all the DhcpSb Children.
+  //
+  NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) {
+    Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link);
+    
+    if ((Instance != NULL) && (Instance->Token != NULL)) {
+      Instance->Timeout--;
+      if (Instance->Timeout == 0) {
+        PxeDhcpDone (Instance);
+      }
     }
   }
 


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

Reply via email to