Fix an issue in DataHubGetNextRecord.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8458 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy
2009-06-03 09:18:55 +00:00
parent bcd7070d86
commit 2ebbe08cb6

View File

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