diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
commit | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch) | |
tree | 21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/record | |
parent | 75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff) | |
parent | d137057fd13e83ec15ab416c7fe774741da06047 (diff) | |
download | vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2 vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/Xext/shm.c
xorg-server/Xext/sync.c
xorg-server/Xext/xf86bigfont.c
xorg-server/Xi/opendev.c
xorg-server/dix/dispatch.c
xorg-server/include/globals.h
xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/record')
-rw-r--r-- | xorg-server/record/record.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c index 8a38118cd..f728cc684 100644 --- a/xorg-server/record/record.c +++ b/xorg-server/record/record.c @@ -38,6 +38,7 @@ and Jim Haggerty of Metheus. #include "dixstruct.h" #include "extnsionst.h" +#include "extinit.h" #include <X11/extensions/recordproto.h> #include "set.h" #include "swaprep.h" @@ -139,8 +140,6 @@ static int RecordDeleteContext(pointer /*value */ , XID /*id */ ); -void RecordExtensionInit(void); - /***************************************************************************/ /* client private stuff */ @@ -241,12 +240,12 @@ RecordFlushReplyBuffer(RecordContextPtr pContext, ++pContext->inFlush; if (pContext->numBufBytes) WriteToClient(pContext->pRecordingClient, pContext->numBufBytes, - (char *) pContext->replyBuffer); + pContext->replyBuffer); pContext->numBufBytes = 0; if (len1) - WriteToClient(pContext->pRecordingClient, len1, (char *) data1); + WriteToClient(pContext->pRecordingClient, len1, data1); if (len2) - WriteToClient(pContext->pRecordingClient, len2, (char *) data2); + WriteToClient(pContext->pRecordingClient, len2, data2); --pContext->inFlush; } /* RecordFlushReplyBuffer */ @@ -1829,8 +1828,7 @@ ProcRecordQueryVersion(ClientPtr client) swaps(&rep.majorVersion); swaps(&rep.minorVersion); } - (void) WriteToClient(client, sizeof(xRecordQueryVersionReply), - (char *) &rep); + WriteToClient(client, sizeof(xRecordQueryVersionReply), &rep); return Success; } /* ProcRecordQueryVersion */ @@ -2136,6 +2134,7 @@ ProcRecordGetContext(ClientPtr client) GetContextRangeInfoPtr pri; int i; int err; + CARD32 nClients, length; REQUEST_SIZE_MATCH(xRecordGetContextReq); VERIFY_CONTEXT(pContext, stuff->context, client); @@ -2219,28 +2218,32 @@ ProcRecordGetContext(ClientPtr client) /* calculate number of clients and reply length */ - rep.nClients = 0; - rep.length = 0; + nClients = 0; + length = 0; for (pRCAP = pContext->pListOfRCAP, pri = pRangeInfo; pRCAP; pRCAP = pRCAP->pNextRCAP, pri++) { - rep.nClients += pRCAP->numClients; - rep.length += pRCAP->numClients * + nClients += pRCAP->numClients; + length += pRCAP->numClients * (bytes_to_int32(sizeof(xRecordClientInfo)) + pri->nRanges * bytes_to_int32(sizeof(xRecordRange))); } /* write the reply header */ + rep.type = X_Reply; - rep.sequenceNumber = client->sequence; rep.enabled = pContext->pRecordingClient != NULL; + rep.sequenceNumber = client->sequence; + rep.length = length; rep.elementHeader = pContext->elemHeaders; + rep.nClients = nClients; + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.nClients); } - (void) WriteToClient(client, sizeof(xRecordGetContextReply), (char *) &rep); + WriteToClient(client, sizeof(xRecordGetContextReply), &rep); /* write all the CLIENT_INFOs */ @@ -2257,9 +2260,9 @@ ProcRecordGetContext(ClientPtr client) rci.clientResource = pRCAP->pClientIDs[i]; if (client->swapped) swapl(&rci.clientResource); - WriteToClient(client, sizeof(xRecordClientInfo), (char *) &rci); + WriteToClient(client, sizeof(xRecordClientInfo), &rci); WriteToClient(client, sizeof(xRecordRange) * pri->nRanges, - (char *) pri->pRanges); + pri->pRanges); } } err = Success; |