diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-26 09:31:03 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-26 09:31:03 +0000 |
commit | 41e4912f2932985647927229118179d1f5eb0283 (patch) | |
tree | b4c71aecfd599f2918a04b6394a1065d334819ce /IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c | |
parent | bcb9d421e0a7897209b098a3cfe57ebf89046588 (diff) | |
download | edk2-platforms-41e4912f2932985647927229118179d1f5eb0283.tar.xz |
fix DataHubGetNextRecord bug
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4441 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c index 75c1addb09..386c31c921 100644 --- a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c +++ b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c @@ -140,7 +140,10 @@ Returns: CopyMem (&Record->ProducerName, ProducerName, sizeof (EFI_GUID));
Record->DataRecordClass = DataRecordClass;
- Record->LogMonotonicCount = Private->GlobalMonotonicCount++;
+ //
+ // Ensure LogMonotonicCount is not zero
+ //
+ Record->LogMonotonicCount = ++Private->GlobalMonotonicCount;
gRT->GetTime (&Record->LogTime, NULL);
@@ -258,8 +261,7 @@ Returns: if (FilterMonotonicCount != 0) {
//
// 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
- // It is not the first time get the new record entry.
+ // But we already processed this vaule, so we need to find the next one.
//
*Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, &FilterMonotonicCount);
*MonotonicCount = FilterMonotonicCount;
@@ -286,12 +288,10 @@ Returns: // If MonotonicCount is zero No more reacords left.
//
if (*MonotonicCount == 0) {
- if (FilterMonotonicCount != 0) {
- //
- // Return the result of our extra GetNextDataRecord.
- //
- FilterDriver->GetNextMonotonicCount = FilterMonotonicCount;
- }
+ //
+ // Save the current Record MonotonicCount.
+ //
+ FilterDriver->GetNextMonotonicCount = (*Record)->LogMonotonicCount;
} else {
//
// Point to next undread record
|