summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2010-05-10 14:00:49 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2010-05-18 14:43:40 +1000
commitfd562d11d6cbde2b227e524ae2a9ce4e347b944b (patch)
treed4e9ac0ced448dd649179bc4f4c6d8ace45eee4b
parent4bcc0448b42b06ec133886ccb4f029b57b6f2b3e (diff)
Fix wrong bracket values when startOver = FALSE.
Currently, SyncComputeBracketValues reuses old values of bracket_greater and bracket_less when startOver = FALSE. This can result in incorrect bracket values. To fix this issue, the startOver parameter is removed, and we do not reuse old values of bracket_greater and bracket_less. X.Org Bug 27023 <http://bugs.freedesktop.org/show_bug.cgi?id=27023> Signed-off-by: David James <davidjames@google.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 758b8614477b53dc3de2b884fec5ccaf8a736432)
-rw-r--r--Xext/sync.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/Xext/sync.c b/Xext/sync.c
index ce6531467..2015fc136 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -94,7 +94,7 @@ static SyncCounter **SysCounterList = NULL;
#define XSyncCAAllTrigger \
(XSyncCACounter | XSyncCAValueType | XSyncCAValue | XSyncCATestType)
-static void SyncComputeBracketValues(SyncCounter *, Bool);
+static void SyncComputeBracketValues(SyncCounter *);
static void SyncInitServerTime(void);
@@ -167,7 +167,7 @@ SyncDeleteTriggerFromCounter(SyncTrigger *pTrigger)
}
if (IsSystemCounter(pTrigger->pCounter))
- SyncComputeBracketValues(pTrigger->pCounter, /*startOver*/ TRUE);
+ SyncComputeBracketValues(pTrigger->pCounter);
}
@@ -194,7 +194,7 @@ SyncAddTriggerToCounter(SyncTrigger *pTrigger)
pTrigger->pCounter->pTriglist = pCur;
if (IsSystemCounter(pTrigger->pCounter))
- SyncComputeBracketValues(pTrigger->pCounter, /*startOver*/ TRUE);
+ SyncComputeBracketValues(pTrigger->pCounter);
return Success;
}
@@ -351,7 +351,7 @@ SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XSyncCounter counter,
}
else if (IsSystemCounter(pCounter))
{
- SyncComputeBracketValues(pCounter, /*startOver*/ TRUE);
+ SyncComputeBracketValues(pCounter);
}
return Success;
@@ -646,7 +646,7 @@ SyncChangeCounter(SyncCounter *pCounter, CARD64 newval)
if (IsSystemCounter(pCounter))
{
- SyncComputeBracketValues(pCounter, /* startOver */ FALSE);
+ SyncComputeBracketValues(pCounter);
}
}
@@ -913,7 +913,7 @@ SyncDestroySystemCounter(pointer pSysCounter)
}
static void
-SyncComputeBracketValues(SyncCounter *pCounter, Bool startOver)
+SyncComputeBracketValues(SyncCounter *pCounter)
{
SyncTriggerList *pCur;
SyncTrigger *pTrigger;
@@ -930,11 +930,8 @@ SyncComputeBracketValues(SyncCounter *pCounter, Bool startOver)
if (ct == XSyncCounterNeverChanges)
return;
- if (startOver)
- {
- XSyncMaxValue(&psci->bracket_greater);
- XSyncMinValue(&psci->bracket_less);
- }
+ XSyncMaxValue(&psci->bracket_greater);
+ XSyncMinValue(&psci->bracket_less);
for (pCur = pCounter->pTriglist; pCur; pCur = pCur->next)
{