fix DataHubGetNextRecord bug

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4441 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian
2007-12-26 09:31:03 +00:00
parent bcb9d421e0
commit 41e4912f29

View File

@@ -140,7 +140,10 @@ Returns:
CopyMem (&Record->ProducerName, ProducerName, sizeof (EFI_GUID)); CopyMem (&Record->ProducerName, ProducerName, sizeof (EFI_GUID));
Record->DataRecordClass = DataRecordClass; Record->DataRecordClass = DataRecordClass;
Record->LogMonotonicCount = Private->GlobalMonotonicCount++; //
// Ensure LogMonotonicCount is not zero
//
Record->LogMonotonicCount = ++Private->GlobalMonotonicCount;
gRT->GetTime (&Record->LogTime, NULL); gRT->GetTime (&Record->LogTime, NULL);
@@ -258,8 +261,7 @@ Returns:
if (FilterMonotonicCount != 0) { 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. So if // But we already processed this vaule, so we need to find the next one.
// It is not the first time get the new record entry.
// //
*Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount); *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);
*MonotonicCount = FilterMonotonicCount; *MonotonicCount = FilterMonotonicCount;
@@ -286,12 +288,10 @@ Returns:
// If MonotonicCount is zero No more reacords left. // If MonotonicCount is zero No more reacords left.
// //
if (*MonotonicCount == 0) { if (*MonotonicCount == 0) {
if (FilterMonotonicCount != 0) { //
// // Save the current Record MonotonicCount.
// Return the result of our extra GetNextDataRecord. //
// FilterDriver->GetNextMonotonicCount = (*Record)->LogMonotonicCount;
FilterDriver->GetNextMonotonicCount = FilterMonotonicCount;
}
} else { } else {
// //
// Point to next undread record // Point to next undread record