From fe616f9230b672edb89fca7516e750dc1b20c690 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 3 Oct 2008 15:42:58 -0400 Subject: [PATCH] Drop the never-called SkippedRequestCallback list. --- hw/xfree86/loader/dixsym.c | 1 - include/os.h | 8 ---- os/io.c | 4 -- record/record.c | 93 -------------------------------------- 4 files changed, 106 deletions(-) diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 359c25695..118e589c3 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -436,7 +436,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(SetCriticalOutputPending) SYMVAR(FlushCallback) SYMVAR(ReplyCallback) - SYMVAR(SkippedRequestsCallback) SYMFUNC(ResetCurrentRequest) /* connection.c */ SYMFUNC(IgnoreClient) diff --git a/include/os.h b/include/os.h index bfe236359..c2bcd0909 100644 --- a/include/os.h +++ b/include/os.h @@ -425,14 +425,6 @@ extern void ddxUseMsg(void); (_pxReq->length ? (otherReqTypePtr)_pxReq \ : (otherReqTypePtr)(((CARD32*)_pxReq)+1)) -/* stuff for SkippedRequestsCallback */ -extern CallbackListPtr SkippedRequestsCallback; -typedef struct { - xReqPtr req; - ClientPtr client; - int numskipped; -} SkippedRequestInfoRec; - /* stuff for ReplyCallback */ extern CallbackListPtr ReplyCallback; typedef struct { diff --git a/os/io.c b/os/io.c index 3c0d494c9..d022aac88 100644 --- a/os/io.c +++ b/os/io.c @@ -576,10 +576,6 @@ ResetCurrentRequest(ClientPtr client) } } - - -_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL; - /* lookup table for adding padding bytes to data that is read from or written to the X socket. */ static int padlength[4] = {0, 3, 2, 1}; diff --git a/record/record.c b/record/record.c index d6a1c983b..46218981b 100644 --- a/record/record.c +++ b/record/record.c @@ -574,95 +574,6 @@ RecordARequest(ClientPtr client) return (* pClientPriv->originalVector[majorop])(client); } /* RecordARequest */ - -/* RecordASkippedRequest - * - * Arguments: - * pcbl is &SkippedRequestCallback. - * nulldata is NULL. - * calldata is a pointer to a SkippedRequestInfoRec (include/os.h) - * which provides information about requests that the server is - * skipping. The client's proc vector won't be called for skipped - * requests, so that's why we have to catch them here. - * - * Returns: nothing. - * - * Side Effects: - * The skipped requests are recorded by all contexts that have - * registered those requests for this client. - * - * Note: most servers don't skip requests, so calls to this will probably - * be rare. For more information on skipped requests, search for - * the word skip in ddx.tbl.ms (the porting layer document). - */ -static void -RecordASkippedRequest(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) -{ - SkippedRequestInfoRec *psi = (SkippedRequestInfoRec *)calldata; - RecordContextPtr pContext; - RecordClientsAndProtocolPtr pRCAP; - xReqPtr stuff = psi->req; - ClientPtr client = psi->client; - int numSkippedRequests = psi->numskipped; - int reqlen; - int i; - int majorop; - - while (numSkippedRequests--) - { - majorop = stuff->reqType; - reqlen = ReqLen(stuff, client); - /* handle big request */ - if (stuff->length == 0) - reqlen += 4; - for (i = 0; i < numEnabledContexts; i++) - { - pContext = ppAllContexts[i]; - pRCAP = RecordFindClientOnContext(pContext, client->clientAsMask, - NULL); - if (pRCAP && pRCAP->pRequestMajorOpSet && - RecordIsMemberOfSet(pRCAP->pRequestMajorOpSet, majorop)) - { - if (majorop <= 127) - { /* core request */ - - RecordAProtocolElement(pContext, client, XRecordFromClient, - (pointer)stuff, reqlen, 0); - } - else /* extension, check minor opcode */ - { - int minorop = MinorOpcodeOfRequest(client); - int numMinOpInfo; - RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo; - - assert (pMinorOpInfo); - numMinOpInfo = pMinorOpInfo->count; - pMinorOpInfo++; - assert (numMinOpInfo); - for ( ; numMinOpInfo; numMinOpInfo--, pMinorOpInfo++) - { - if (majorop >= pMinorOpInfo->major.first && - majorop <= pMinorOpInfo->major.last && - RecordIsMemberOfSet(pMinorOpInfo->major.pMinOpSet, - minorop)) - { - RecordAProtocolElement(pContext, client, - XRecordFromClient, (pointer)stuff, - reqlen, 0); - break; - } - } /* end for each minor op info */ - } /* end extension request */ - } /* end this RCAP wants this major opcode */ - } /* end for each context */ - - /* go to next request */ - stuff = (xReqPtr)( ((char *)stuff) + reqlen); - - } /* end for each skipped request */ -} /* RecordASkippedRequest */ - - /* RecordAReply * * Arguments: @@ -1012,9 +923,6 @@ RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) return BadAlloc; if (!AddCallback(&ReplyCallback, RecordAReply, NULL)) return BadAlloc; - if (!AddCallback(&SkippedRequestsCallback, RecordASkippedRequest, - NULL)) - return BadAlloc; if (!AddCallback(&FlushCallback, RecordFlushAllContexts, NULL)) return BadAlloc; /* Alternate context flushing scheme: delete the line above @@ -1116,7 +1024,6 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) DeleteCallback(&EventCallback, RecordADeliveredEventOrError, NULL); DeleteCallback(&DeviceEventCallback, RecordADeviceEvent, NULL); DeleteCallback(&ReplyCallback, RecordAReply, NULL); - DeleteCallback(&SkippedRequestsCallback, RecordASkippedRequest, NULL); DeleteCallback(&FlushCallback, RecordFlushAllContexts, NULL); /* Alternate context flushing scheme: delete the line above * and call RemoveBlockAndWakeupHandlers here passing