Skip to content

Commit

Permalink
Drop the never-called SkippedRequestCallback list.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwnk committed Oct 3, 2008
1 parent 31136b9 commit fe616f9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 106 deletions.
1 change: 0 additions & 1 deletion hw/xfree86/loader/dixsym.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(SetCriticalOutputPending)
SYMVAR(FlushCallback)
SYMVAR(ReplyCallback)
SYMVAR(SkippedRequestsCallback)
SYMFUNC(ResetCurrentRequest)
/* connection.c */
SYMFUNC(IgnoreClient)
Expand Down
8 changes: 0 additions & 8 deletions include/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions os/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
93 changes: 0 additions & 93 deletions record/record.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fe616f9

Please sign in to comment.