summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Jones <jajones@nvidia.com>2010-12-06 13:36:14 -0800
committerJulien Cristau <jcristau@debian.org>2011-01-02 13:09:36 +0100
commitc038d008e4004914dc5ad58ba73d51baf0cd91ac (patch)
tree1db1c5fb99a87b5fa3fe209221c32c34ec35d761
parent472163b7f3a5e7aa7f40fa81b1facc71dd3529bc (diff)
Add and use SERVER_SYNC_*_VERSION
Most extensions have a version defined in the protocol headers, and also in the server's protocol-versions.h. The latter defines which version the server advertises support for. Sync wasn't included in protocol-versions.h, and was advertising support for whatever was in the protocol headers the server was built against. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459)
-rw-r--r--Xext/sync.c5
-rw-r--r--include/protocol-versions.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/Xext/sync.c b/Xext/sync.c
index 667f8ab78..48dea6f31 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,6 +67,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "opaque.h"
#include <X11/extensions/syncproto.h>
#include "syncsrv.h"
+#include "protocol-versions.h"
#include <stdio.h>
#if !defined(WIN32)
@@ -1140,8 +1141,8 @@ ProcSyncInitialize(ClientPtr client)
memset(&rep, 0, sizeof(xSyncInitializeReply));
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.majorVersion = SYNC_MAJOR_VERSION;
- rep.minorVersion = SYNC_MINOR_VERSION;
+ rep.majorVersion = SERVER_SYNC_MAJOR_VERSION;
+ rep.minorVersion = SERVER_SYNC_MINOR_VERSION;
rep.length = 0;
if (client->swapped)
diff --git a/include/protocol-versions.h b/include/protocol-versions.h
index da9770ce3..f623b3c7a 100644
--- a/include/protocol-versions.h
+++ b/include/protocol-versions.h
@@ -99,6 +99,10 @@
#define SERVER_SHM_MAJOR_VERSION 1
#define SERVER_SHM_MINOR_VERSION 1
+/* Sync */
+#define SERVER_SYNC_MAJOR_VERSION 3
+#define SERVER_SYNC_MINOR_VERSION 0
+
/* Windows WM */
#define SERVER_WINDOWSWM_MAJOR_VERSION 1
#define SERVER_WINDOWSWM_MINOR_VERSION 0