diff options
-rw-r--r-- | nx-X11/programs/Xserver/record/record.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/record/record.c b/nx-X11/programs/Xserver/record/record.c index df9419f22..48b1964e6 100644 --- a/nx-X11/programs/Xserver/record/record.c +++ b/nx-X11/programs/Xserver/record/record.c @@ -74,6 +74,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 @@ -242,8 +243,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); @@ -252,6 +254,7 @@ RecordFlushReplyBuffer( WriteToClient(pContext->pRecordingClient, len1, data1); if (len2) WriteToClient(pContext->pRecordingClient, len2, data2); + --pContext->inFlush; } /* RecordFlushReplyBuffer */ @@ -2039,6 +2042,7 @@ ProcRecordCreateContext(client) pContext->numBufBytes = 0; pContext->pBufClient = NULL; pContext->continuedReply = 0; + pContext->inFlush = 0; err = RecordRegisterClients(pContext, client, (xRecordRegisterClientsReq *)stuff); |