summaryrefslogtreecommitdiff
path: root/xserver/record
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
commit45d2cfad3bb2ac4246dc1863e5b8689d6bb34fa8 (patch)
tree8cf9735d4bf7b17b11cb2b5f9d56b797d20c438d /xserver/record
parent68fd41f12f9344d45b8a897e368548c7dcb0d366 (diff)
Update to xserver 1.9.5. Tested by jasper@, ajacoutot@ and krw@
Diffstat (limited to 'xserver/record')
-rw-r--r--xserver/record/record.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xserver/record/record.c b/xserver/record/record.c
index 6a93d7a5c..facaebb02 100644
--- a/xserver/record/record.c
+++ b/xserver/record/record.c
@@ -77,6 +77,7 @@ typedef struct {
char bufCategory; /* category of protocol in replyBuffer */
int numBufBytes; /* number of bytes in replyBuffer */
char replyBuffer[REPLY_BUF_SIZE]; /* buffered recorded protocol */
+ int inFlush; /* are we inside RecordFlushReplyBuffer */
} RecordContextRec, *RecordContextPtr;
/* RecordMinorOpRec - to hold minor opcode selections for extension requests
@@ -245,8 +246,9 @@ RecordFlushReplyBuffer(
int len2
)
{
- if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone)
+ if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone || pContext->inFlush)
return;
+ ++pContext->inFlush;
if (pContext->numBufBytes)
WriteToClient(pContext->pRecordingClient, pContext->numBufBytes,
(char *)pContext->replyBuffer);
@@ -255,6 +257,7 @@ RecordFlushReplyBuffer(
WriteToClient(pContext->pRecordingClient, len1, (char *)data1);
if (len2)
WriteToClient(pContext->pRecordingClient, len2, (char *)data2);
+ --pContext->inFlush;
} /* RecordFlushReplyBuffer */
@@ -1938,6 +1941,7 @@ ProcRecordCreateContext(ClientPtr client)
pContext->numBufBytes = 0;
pContext->pBufClient = NULL;
pContext->continuedReply = 0;
+ pContext->inFlush = 0;
err = RecordRegisterClients(pContext, client,
(xRecordRegisterClientsReq *)stuff);