]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix an issue in DataHubGetNextRecord.
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Jun 2009 09:18:55 +0000 (09:18 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Jun 2009 09:18:55 +0000 (09:18 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8458 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c

index b58de9db6fe8275ac65e85fbef3f9223f252418c..a2e991a28876d59cf7cfffce6ccd86acb23bf19b 100644 (file)
@@ -243,19 +243,22 @@ DataHubGetNextRecord (
       // Use the MTC from the Filter Driver.\r
       //\r
       FilterMonotonicCount = FilterDriver->GetNextMonotonicCount;\r
+       \r
+      //\r
+      // The GetNextMonotonicCount field remembers the last value from the previous time.\r
+      // But we already processed this vaule, so we need to find the next one.\r
+      //\r
+      *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);\r
       if (FilterMonotonicCount != 0) {\r
+        *MonotonicCount = FilterMonotonicCount;\r
+      }\r
+      \r
+      if ((FilterDriver->GetNextMonotonicCount != 0) && (FilterMonotonicCount == 0)) {\r
         //\r
-        // The GetNextMonotonicCount field remembers the last value from the previous time.\r
-        // But we already processed this vaule, so we need to find the next one.\r
+        // If there is no new record to get exit now.\r
         //\r
-        *Record         = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);\r
-        *MonotonicCount = FilterMonotonicCount;\r
-        if (FilterMonotonicCount == 0) {\r
-          //\r
-          // If there is no new record to get exit now.\r
-          //\r
-          return EFI_NOT_FOUND;\r
-        }\r
+        *MonotonicCount = 0;\r
+        return EFI_NOT_FOUND;\r
       }\r
     }\r
   }\r