dix: remove proc tables initialization

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
Tiago Vignatti 2010-07-18 18:56:02 +03:00
parent cbd4d5dbb7
commit e416965bfd
3 changed files with 492 additions and 40 deletions

View File

@ -238,7 +238,6 @@ long SmartLastPrint;
#endif
void Dispatch(void);
void InitProcVectors(void);
static int
SmartScheduleClient (int *clientReady, int nready)
@ -3387,25 +3386,6 @@ int ProcNoOperation(ClientPtr client)
return Success;
}
void
InitProcVectors(void)
{
int i;
for (i = 0; i<256; i++)
{
if(!ProcVector[i])
{
ProcVector[i] = SwappedProcVector[i] = ProcBadRequest;
ReplySwapVector[i] = ReplyNotSwappd;
}
}
for(i = LASTEvent; i < 128; i++)
{
EventSwapVector[i] = NotImplemented;
}
}
/**********************
* CloseDownClient
*

View File

@ -108,7 +108,6 @@ Equipment Corporation.
#include "panoramiXsrv.h"
#else
#include "dixevents.h" /* InitEvents() */
#include "dispatch.h" /* InitProcVectors() */
#endif
#ifdef DPMSExtension
@ -118,8 +117,6 @@ Equipment Corporation.
extern void Dispatch(void);
extern void InitProcVectors(void);
#ifdef XQUARTZ
#include <pthread.h>
@ -171,7 +168,6 @@ int main(int argc, char *argv[], char *envp[])
if(serverGeneration == 1)
{
CreateWellKnownSockets();
InitProcVectors();
for (i=1; i<MAXCLIENTS; i++)
clients[i] = NullClient;
serverClient = calloc(sizeof(ClientRec), 1);

View File

@ -192,14 +192,142 @@ int (* ProcVector[256]) (
ProcGetPointerMapping,
ProcSetModifierMapping,
ProcGetModifierMapping,
0, /* 120 */
0,
0,
0,
0,
0, /* 125 */
0,
ProcNoOperation
ProcBadRequest, /* 120 */
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest, /* 125 */
ProcBadRequest,
ProcNoOperation,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest
};
int (* SwappedProcVector[256]) (
@ -326,14 +454,142 @@ int (* SwappedProcVector[256]) (
SProcSimpleReq, /* GetPointerMapping, */
SProcSimpleReq, /* SetModifierMapping, */
SProcSimpleReq, /* GetModifierMapping, */
0, /* 120 */
0,
0,
0,
0,
0, /* 125 */
0,
SProcNoOperation
ProcBadRequest, /* 120 */
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest, /* 125 */
ProcBadRequest,
SProcNoOperation,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest,
ProcBadRequest
};
EventSwapPtr EventSwapVector[128] =
@ -373,6 +629,99 @@ EventSwapPtr EventSwapVector[128] =
SColormapEvent,
SClientMessageEvent,
SMappingEvent,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented
};
@ -506,5 +855,132 @@ ReplySwapPtr ReplySwapVector[256] =
ReplyNotSwappd, /* 125 */
ReplyNotSwappd, /* 126 */
ReplyNotSwappd, /* NoOperation */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd
};