Bigreqs are built-in and mandatory.
This commit is contained in:
parent
d6228cb22a
commit
f65c50c4e9
|
@ -20,6 +20,7 @@ endif
|
||||||
|
|
||||||
# Sources always included in libXextbuiltin.la & libXext.la
|
# Sources always included in libXextbuiltin.la & libXext.la
|
||||||
BUILTIN_SRCS = \
|
BUILTIN_SRCS = \
|
||||||
|
bigreq.c \
|
||||||
shape.c \
|
shape.c \
|
||||||
sleepuntil.c \
|
sleepuntil.c \
|
||||||
sleepuntil.h \
|
sleepuntil.h \
|
||||||
|
@ -28,7 +29,6 @@ BUILTIN_SRCS = \
|
||||||
|
|
||||||
# Sources always included in libXextmodule.la & libXext.la
|
# Sources always included in libXextmodule.la & libXext.la
|
||||||
MODULE_SRCS = \
|
MODULE_SRCS = \
|
||||||
bigreq.c \
|
|
||||||
sync.c \
|
sync.c \
|
||||||
xcmisc.c
|
xcmisc.c
|
||||||
|
|
||||||
|
|
|
@ -65,15 +65,6 @@ static ExtensionModule extensionModules[] = {
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef BIGREQS
|
|
||||||
{
|
|
||||||
BigReqExtensionInit,
|
|
||||||
XBigReqExtensionName,
|
|
||||||
&noBigReqExtension,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef XSYNC
|
#ifdef XSYNC
|
||||||
{
|
{
|
||||||
SyncExtensionInit,
|
SyncExtensionInit,
|
||||||
|
|
|
@ -27,11 +27,6 @@ extern void XTestExtensionInit(INITARGS);
|
||||||
extern void XTestExtension1Init(INITARGS);
|
extern void XTestExtension1Init(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BIGREQS
|
|
||||||
extern void BigReqExtensionInit(INITARGS);
|
|
||||||
#include <X11/extensions/bigreqstr.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef XSYNC
|
#ifdef XSYNC
|
||||||
extern void SyncExtensionInit(INITARGS);
|
extern void SyncExtensionInit(INITARGS);
|
||||||
#define _SYNC_SERVER
|
#define _SYNC_SERVER
|
||||||
|
|
|
@ -226,8 +226,6 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMVAR(DPMSDisabledSwitch)
|
SYMVAR(DPMSDisabledSwitch)
|
||||||
SYMVAR(defaultDPMSEnabled)
|
SYMVAR(defaultDPMSEnabled)
|
||||||
#endif
|
#endif
|
||||||
/* bigreq */
|
|
||||||
SYMVAR(maxBigRequestSize)
|
|
||||||
#ifdef XV
|
#ifdef XV
|
||||||
/* XXX These are exported from the DDX, not DIX. */
|
/* XXX These are exported from the DDX, not DIX. */
|
||||||
SYMVAR(XvScreenInitProc)
|
SYMVAR(XvScreenInitProc)
|
||||||
|
@ -341,9 +339,6 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
SYMVAR(noTestExtensions)
|
SYMVAR(noTestExtensions)
|
||||||
SYMFUNC(GiveUp)
|
SYMFUNC(GiveUp)
|
||||||
|
|
||||||
#ifdef BIGREQS
|
|
||||||
SYMVAR(noBigReqExtension)
|
|
||||||
#endif
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
SYMVAR(noCompositeExtension)
|
SYMVAR(noCompositeExtension)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,10 +45,6 @@ extern Bool DPMSCapableFlag;
|
||||||
extern Bool PanoramiXExtensionDisabledHack;
|
extern Bool PanoramiXExtensionDisabledHack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BIGREQS
|
|
||||||
extern Bool noBigReqExtension;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
extern Bool noCompositeExtension;
|
extern Bool noCompositeExtension;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -86,9 +86,6 @@ SOFTWARE.
|
||||||
|
|
||||||
extern Bool noTestExtensions;
|
extern Bool noTestExtensions;
|
||||||
|
|
||||||
#ifdef BIGREQS
|
|
||||||
extern Bool noBigReqExtension;
|
|
||||||
#endif
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
extern Bool noCompositeExtension;
|
extern Bool noCompositeExtension;
|
||||||
#endif
|
#endif
|
||||||
|
@ -220,9 +217,7 @@ extern void XInputExtensionInit(INITARGS);
|
||||||
#ifdef XTEST
|
#ifdef XTEST
|
||||||
extern void XTestExtensionInit(INITARGS);
|
extern void XTestExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BIGREQS
|
|
||||||
extern void BigReqExtensionInit(INITARGS);
|
extern void BigReqExtensionInit(INITARGS);
|
||||||
#endif
|
|
||||||
#ifdef XIDLE
|
#ifdef XIDLE
|
||||||
extern void XIdleExtensionInit(INITARGS);
|
extern void XIdleExtensionInit(INITARGS);
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,9 +308,6 @@ static ExtensionToggle ExtensionToggleList[] =
|
||||||
{
|
{
|
||||||
/* sort order is extension name string as shown in xdpyinfo */
|
/* sort order is extension name string as shown in xdpyinfo */
|
||||||
{ "Generic Events", &noGEExtension },
|
{ "Generic Events", &noGEExtension },
|
||||||
#ifdef BIGREQS
|
|
||||||
{ "BIG-REQUESTS", &noBigReqExtension },
|
|
||||||
#endif
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
{ "Composite", &noCompositeExtension },
|
{ "Composite", &noCompositeExtension },
|
||||||
#endif
|
#endif
|
||||||
|
@ -445,9 +437,7 @@ InitExtensions(int argc, char *argv[])
|
||||||
#ifdef XTEST
|
#ifdef XTEST
|
||||||
if (!noTestExtensions) XTestExtensionInit();
|
if (!noTestExtensions) XTestExtensionInit();
|
||||||
#endif
|
#endif
|
||||||
#ifdef BIGREQS
|
BigReqExtensionInit();
|
||||||
if (!noBigReqExtension) BigReqExtensionInit();
|
|
||||||
#endif
|
|
||||||
#ifdef XIDLE
|
#ifdef XIDLE
|
||||||
if (!noXIdleExtension) XIdleExtensionInit();
|
if (!noXIdleExtension) XIdleExtensionInit();
|
||||||
#endif
|
#endif
|
||||||
|
@ -548,6 +538,7 @@ static ExtensionModule staticExtensions[] = {
|
||||||
#ifdef XTEST
|
#ifdef XTEST
|
||||||
{ XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
|
{ XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
|
||||||
#endif
|
#endif
|
||||||
|
{ BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL, NULL },
|
||||||
#ifdef XIDLE
|
#ifdef XIDLE
|
||||||
{ XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
|
{ XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
|
||||||
#endif
|
#endif
|
||||||
|
|
20
os/io.c
20
os/io.c
|
@ -106,13 +106,11 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
|
||||||
#define get_req_len(req,cli) ((cli)->swapped ? \
|
#define get_req_len(req,cli) ((cli)->swapped ? \
|
||||||
lswaps((req)->length) : (req)->length)
|
lswaps((req)->length) : (req)->length)
|
||||||
|
|
||||||
#ifdef BIGREQS
|
|
||||||
#include <X11/extensions/bigreqstr.h>
|
#include <X11/extensions/bigreqstr.h>
|
||||||
|
|
||||||
#define get_big_req_len(req,cli) ((cli)->swapped ? \
|
#define get_big_req_len(req,cli) ((cli)->swapped ? \
|
||||||
lswapl(((xBigReq *)(req))->length) : \
|
lswapl(((xBigReq *)(req))->length) : \
|
||||||
((xBigReq *)(req))->length)
|
((xBigReq *)(req))->length)
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_TIMES_PER 10
|
#define MAX_TIMES_PER 10
|
||||||
|
|
||||||
|
@ -192,9 +190,7 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
int result;
|
int result;
|
||||||
register xReq *request;
|
register xReq *request;
|
||||||
Bool need_header;
|
Bool need_header;
|
||||||
#ifdef BIGREQS
|
|
||||||
Bool move_header;
|
Bool move_header;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If an input buffer was empty, either free it if it is too big
|
/* If an input buffer was empty, either free it if it is too big
|
||||||
* or link it into our list of free input buffers. This means that
|
* or link it into our list of free input buffers. This means that
|
||||||
|
@ -243,9 +239,7 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
oci->bufptr += oci->lenLastReq;
|
oci->bufptr += oci->lenLastReq;
|
||||||
|
|
||||||
need_header = FALSE;
|
need_header = FALSE;
|
||||||
#ifdef BIGREQS
|
|
||||||
move_header = FALSE;
|
move_header = FALSE;
|
||||||
#endif
|
|
||||||
gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
|
gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
|
||||||
if (gotnow < sizeof(xReq))
|
if (gotnow < sizeof(xReq))
|
||||||
{
|
{
|
||||||
|
@ -262,7 +256,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
request = (xReq *)oci->bufptr;
|
request = (xReq *)oci->bufptr;
|
||||||
needed = get_req_len(request, client);
|
needed = get_req_len(request, client);
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!needed && client->big_requests)
|
if (!needed && client->big_requests)
|
||||||
{
|
{
|
||||||
/* It's a Big Request. */
|
/* It's a Big Request. */
|
||||||
|
@ -276,7 +269,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
else
|
else
|
||||||
needed = get_big_req_len(request, client);
|
needed = get_big_req_len(request, client);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
client->req_len = needed;
|
client->req_len = needed;
|
||||||
needed <<= 2; /* needed is in bytes now */
|
needed <<= 2; /* needed is in bytes now */
|
||||||
}
|
}
|
||||||
|
@ -289,14 +281,12 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
oci->lenLastReq = 0;
|
oci->lenLastReq = 0;
|
||||||
#ifdef BIGREQS
|
|
||||||
if (needed > maxBigRequestSize << 2)
|
if (needed > maxBigRequestSize << 2)
|
||||||
{
|
{
|
||||||
/* request is too big for us to handle */
|
/* request is too big for us to handle */
|
||||||
YieldControlDeath();
|
YieldControlDeath();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if ((gotnow == 0) ||
|
if ((gotnow == 0) ||
|
||||||
((oci->bufptr - oci->buffer + needed) > oci->size))
|
((oci->bufptr - oci->buffer + needed) > oci->size))
|
||||||
{
|
{
|
||||||
|
@ -373,7 +363,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
/* We wanted an xReq, now we've gotten it. */
|
/* We wanted an xReq, now we've gotten it. */
|
||||||
request = (xReq *)oci->bufptr;
|
request = (xReq *)oci->bufptr;
|
||||||
needed = get_req_len(request, client);
|
needed = get_req_len(request, client);
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!needed && client->big_requests)
|
if (!needed && client->big_requests)
|
||||||
{
|
{
|
||||||
move_header = TRUE;
|
move_header = TRUE;
|
||||||
|
@ -382,7 +371,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
else
|
else
|
||||||
needed = get_big_req_len(request, client);
|
needed = get_big_req_len(request, client);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
client->req_len = needed;
|
client->req_len = needed;
|
||||||
needed <<= 2;
|
needed <<= 2;
|
||||||
}
|
}
|
||||||
|
@ -395,11 +383,9 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
}
|
}
|
||||||
if (needed == 0)
|
if (needed == 0)
|
||||||
{
|
{
|
||||||
#ifdef BIGREQS
|
|
||||||
if (client->big_requests)
|
if (client->big_requests)
|
||||||
needed = sizeof(xBigReq);
|
needed = sizeof(xBigReq);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
needed = sizeof(xReq);
|
needed = sizeof(xReq);
|
||||||
}
|
}
|
||||||
oci->lenLastReq = needed;
|
oci->lenLastReq = needed;
|
||||||
|
@ -417,12 +403,10 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
request = (xReq *)(oci->bufptr + needed);
|
request = (xReq *)(oci->bufptr + needed);
|
||||||
if (gotnow >= (result = (get_req_len(request, client) << 2))
|
if (gotnow >= (result = (get_req_len(request, client) << 2))
|
||||||
#ifdef BIGREQS
|
|
||||||
&& (result ||
|
&& (result ||
|
||||||
(client->big_requests &&
|
(client->big_requests &&
|
||||||
(gotnow >= sizeof(xBigReq) &&
|
(gotnow >= sizeof(xBigReq) &&
|
||||||
gotnow >= (get_big_req_len(request, client) << 2))))
|
gotnow >= (get_big_req_len(request, client) << 2))))
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
FD_SET(fd, &ClientsWithInput);
|
FD_SET(fd, &ClientsWithInput);
|
||||||
else
|
else
|
||||||
|
@ -451,7 +435,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
#endif
|
#endif
|
||||||
if (++timesThisConnection >= MAX_TIMES_PER)
|
if (++timesThisConnection >= MAX_TIMES_PER)
|
||||||
YieldControl();
|
YieldControl();
|
||||||
#ifdef BIGREQS
|
|
||||||
if (move_header)
|
if (move_header)
|
||||||
{
|
{
|
||||||
request = (xReq *)oci->bufptr;
|
request = (xReq *)oci->bufptr;
|
||||||
|
@ -460,7 +443,6 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
|
oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
|
||||||
client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
|
client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
client->requestBuffer = (pointer)oci->bufptr;
|
client->requestBuffer = (pointer)oci->bufptr;
|
||||||
#ifdef DEBUG_COMMUNICATION
|
#ifdef DEBUG_COMMUNICATION
|
||||||
{
|
{
|
||||||
|
@ -572,7 +554,6 @@ ResetCurrentRequest(ClientPtr client)
|
||||||
{
|
{
|
||||||
request = (xReq *)oci->bufptr;
|
request = (xReq *)oci->bufptr;
|
||||||
needed = get_req_len(request, client);
|
needed = get_req_len(request, client);
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!needed && client->big_requests)
|
if (!needed && client->big_requests)
|
||||||
{
|
{
|
||||||
oci->bufptr -= sizeof(xBigReq) - sizeof(xReq);
|
oci->bufptr -= sizeof(xBigReq) - sizeof(xReq);
|
||||||
|
@ -584,7 +565,6 @@ ResetCurrentRequest(ClientPtr client)
|
||||||
swapl(&((xBigReq *)oci->bufptr)->length, n);
|
swapl(&((xBigReq *)oci->bufptr)->length, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (gotnow >= (needed << 2))
|
if (gotnow >= (needed << 2))
|
||||||
{
|
{
|
||||||
if (FD_ISSET(fd, &AllClients))
|
if (FD_ISSET(fd, &AllClients))
|
||||||
|
|
|
@ -124,9 +124,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_X_EXPORT Bool noTestExtensions;
|
_X_EXPORT Bool noTestExtensions;
|
||||||
#ifdef BIGREQS
|
|
||||||
_X_EXPORT Bool noBigReqExtension = FALSE;
|
|
||||||
#endif
|
|
||||||
#ifdef COMPOSITE
|
#ifdef COMPOSITE
|
||||||
_X_EXPORT Bool noCompositeExtension = FALSE;
|
_X_EXPORT Bool noCompositeExtension = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue