Commit 2f0d2d38 authored by Mike Gabriel's avatar Mike Gabriel

LBX: Drop all Xserver code blocks that relate to removed LBX extension.

parent e80842cc
...@@ -157,10 +157,6 @@ extern Bool SecurityCheckDeviceAccess(ClientPtr client, DeviceIntPtr dev, ...@@ -157,10 +157,6 @@ extern Bool SecurityCheckDeviceAccess(ClientPtr client, DeviceIntPtr dev,
extern void SecurityAudit(char *format, ...); extern void SecurityAudit(char *format, ...);
#ifdef LBX
extern Bool SecuritySameLevel(ClientPtr client, XID authId);
#endif
extern int XSecurityOptions(int argc, char **argv, int i); extern int XSecurityOptions(int argc, char **argv, int i);
/* Give this value or higher to the -audit option to get security messages */ /* Give this value or higher to the -audit option to get security messages */
......
...@@ -60,11 +60,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -60,11 +60,6 @@ in this Software without prior written authorization from The Open Group.
#include <nx-X11/extensions/securstr.h> #include <nx-X11/extensions/securstr.h>
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef LBX
#define _XLBX_SERVER_
#include <nx-X11/extensions/XLbx.h>
extern unsigned char LbxReqCode;
#endif
#include <stdio.h> /* for file reading operations */ #include <stdio.h> /* for file reading operations */
#include <nx-X11/Xatom.h> /* for XA_STRING */ #include <nx-X11/Xatom.h> /* for XA_STRING */
...@@ -1224,18 +1219,6 @@ SecurityCheckResourceIDAccess( ...@@ -1224,18 +1219,6 @@ SecurityCheckResourceIDAccess(
default: default:
{ {
#ifdef LBX
/* XXX really need per extension dispatching */
if (reqtype == LbxReqCode) {
switch (((xReq *)client->requestBuffer)->data) {
case X_LbxGetProperty:
case X_LbxChangeProperty:
return rval;
default:
break;
}
}
#endif
/* others not allowed */ /* others not allowed */
return SecurityAuditResourceIDAccess(client, id); return SecurityAuditResourceIDAccess(client, id);
} }
...@@ -1336,22 +1319,6 @@ SecurityClientStateCallback( ...@@ -1336,22 +1319,6 @@ SecurityClientStateCallback(
} }
} /* SecurityClientStateCallback */ } /* SecurityClientStateCallback */
#ifdef LBX
Bool
SecuritySameLevel(client, authId)
ClientPtr client;
XID authId;
{
SecurityAuthorizationPtr pAuth;
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
SecurityAuthorizationResType);
if (pAuth)
return client->trustLevel == pAuth->trustLevel;
return client->trustLevel == XSecurityClientTrusted;
}
#endif
/* SecurityCensorImage /* SecurityCensorImage
* *
* Called after pScreen->GetImage to prevent pieces or trusted windows from * Called after pScreen->GetImage to prevent pieces or trusted windows from
......
...@@ -63,9 +63,6 @@ SOFTWARE. ...@@ -63,9 +63,6 @@ SOFTWARE.
#include "scrnintstr.h" #include "scrnintstr.h"
#include "resource.h" #include "resource.h"
#include "windowstr.h" #include "windowstr.h"
#ifdef LBX
#include "lbxserve.h"
#endif
extern XID clientErrorValue; extern XID clientErrorValue;
extern int colormapPrivateCount; extern int colormapPrivateCount;
...@@ -1508,65 +1505,17 @@ FreePixels(register ColormapPtr pmap, register int client) ...@@ -1508,65 +1505,17 @@ FreePixels(register ColormapPtr pmap, register int client)
register Pixel *ppix, *ppixStart; register Pixel *ppix, *ppixStart;
register int n; register int n;
int class; int class;
#ifdef LBX
Bool grabbed;
Bool zeroRefCount;
Bool anyRefCountReachedZero = 0;
#endif
class = pmap->class; class = pmap->class;
ppixStart = pmap->clientPixelsRed[client]; ppixStart = pmap->clientPixelsRed[client];
if (class & DynamicClass) if (class & DynamicClass)
{ {
n = pmap->numPixelsRed[client]; n = pmap->numPixelsRed[client];
#ifdef LBX
grabbed = LbxCheckCmapGrabbed (pmap);
if (grabbed)
{
/*
* If the colormap is grabbed by a proxy, the server must
* notify the proxy of all cells that are freed (the refcount
* has reached zero on these cells).
*/
LbxBeginFreeCellsEvent (pmap);
LbxSortPixelList (ppixStart, n);
}
#endif
for (ppix = ppixStart; --n >= 0; ) for (ppix = ppixStart; --n >= 0; )
{ {
FreeCell(pmap, *ppix, REDMAP); FreeCell(pmap, *ppix, REDMAP);
#ifdef LBX
/*
* Only PSEUDO colormaps are grabbed by LBX proxies.
* Check if the ref count reached zero on this pixel.
*/
zeroRefCount = pmap->red[*ppix].refcnt == 0;
if (zeroRefCount)
anyRefCountReachedZero = 1;
if (grabbed && zeroRefCount)
LbxAddFreeCellToEvent (pmap, *ppix);
#endif
ppix++; ppix++;
} }
#ifdef LBX
if (grabbed)
LbxEndFreeCellsEvent (pmap);
else if (anyRefCountReachedZero)
{
/*
* We only send LbxFreeCell events to a proxy that has the colormap
* grabbed. If the colormap is not grabbed, the proxy that last
* had the colormap grabbed will not be able to do a smart grab
* in the future. A smart grab can only occur if the proxy is kept
* up to date on every alloc/free change in the colormap.
*/
LbxDisableSmartGrab (pmap);
}
#endif
} }
xfree(ppixStart); xfree(ppixStart);
...@@ -2316,11 +2265,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe ...@@ -2316,11 +2265,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
int n, zapped; int n, zapped;
int errVal = Success; int errVal = Success;
int offset, numents; int offset, numents;
#ifdef LBX
Bool grabbed;
Bool zeroRefCount;
Bool anyRefCountReachedZero = 0;
#endif
if (npixIn == 0) if (npixIn == 0)
return (errVal); return (errVal);
...@@ -2365,22 +2309,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe ...@@ -2365,22 +2309,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
break; break;
} }
#ifdef LBX
grabbed = LbxCheckCmapGrabbed (pmap);
if (grabbed)
{
/*
* If the colormap is grabbed by a proxy, the server must
* notify the proxy of all cells that are freed (the refcount
* has reached zero on these cells).
*/
LbxBeginFreeCellsEvent (pmap);
LbxSortPixelList (ppixIn, npixIn);
}
#endif
/* zap all pixels which match */ /* zap all pixels which match */
while (1) while (1)
{ {
...@@ -2405,19 +2333,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe ...@@ -2405,19 +2333,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
if (pmap->class & DynamicClass) if (pmap->class & DynamicClass)
{ {
FreeCell(pmap, pixTest, color); FreeCell(pmap, pixTest, color);
#ifdef LBX
/*
* Only PSEUDO colormaps are grabbed by LBX proxies.
* Check if the ref count reached zero on this pixel.
*/
zeroRefCount = pmap->red[pixTest].refcnt == 0;
if (zeroRefCount)
anyRefCountReachedZero = 1;
if (grabbed && zeroRefCount)
LbxAddFreeCellToEvent (pmap, pixTest);
#endif
} }
*cptr = ~((Pixel)0); *cptr = ~((Pixel)0);
zapped++; zapped++;
...@@ -2429,23 +2344,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe ...@@ -2429,23 +2344,6 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
GetNextBitsOrBreak(bits, mask, base); GetNextBitsOrBreak(bits, mask, base);
} }
#ifdef LBX
if (grabbed)
LbxEndFreeCellsEvent (pmap);
else if (anyRefCountReachedZero)
{
/*
* We only send LbxFreeCell events to a proxy that has the colormap
* grabbed. If the colormap is not grabbed, the proxy that last
* had the colormap grabbed will not be able to do a smart grab
* in the future. A smart grab can only occur if the proxy is kept
* up to date on every alloc/free change in the colormap.
*/
LbxDisableSmartGrab (pmap);
}
#endif
/* delete freed pixels from client pixel list */ /* delete freed pixels from client pixel list */
if (zapped) if (zapped)
{ {
......
...@@ -74,9 +74,6 @@ SOFTWARE. ...@@ -74,9 +74,6 @@ SOFTWARE.
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/security.h> #include <nx-X11/extensions/security.h>
#endif #endif
#ifdef LBX
#include "lbxserve.h"
#endif
#include "dispatch.h" #include "dispatch.h"
#include "swaprep.h" #include "swaprep.h"
...@@ -961,9 +958,6 @@ ProcSetModifierMapping(ClientPtr client) ...@@ -961,9 +958,6 @@ ProcSetModifierMapping(ClientPtr client)
return BadAccess; return BadAccess;
#endif #endif
#ifdef LBX
LbxFlushModifierMapTag();
#endif
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
...@@ -1088,9 +1082,6 @@ ProcChangeKeyboardMapping(ClientPtr client) ...@@ -1088,9 +1082,6 @@ ProcChangeKeyboardMapping(ClientPtr client)
keysyms.map = (KeySym *)&stuff[1]; keysyms.map = (KeySym *)&stuff[1];
if (!SetKeySymsMap(curKeySyms, &keysyms)) if (!SetKeySymsMap(curKeySyms, &keysyms))
return BadAlloc; return BadAlloc;
#ifdef LBX
LbxFlushKeyboardMapTag();
#endif
SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes, SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes,
client); client);
return client->noClientException; return client->noClientException;
......
...@@ -2611,15 +2611,6 @@ ProcAllocColor (register ClientPtr client) ...@@ -2611,15 +2611,6 @@ ProcAllocColor (register ClientPtr client)
RT_COLORMAP, SecurityWriteAccess); RT_COLORMAP, SecurityWriteAccess);
if (pmap) if (pmap)
{ {
#ifdef LBX
/*
* If the colormap is grabbed by a proxy, the server will have
* to regain control over the colormap. This AllocColor request
* will be handled after the server gets back the colormap control.
*/
if (LbxCheckColorRequest (client, pmap, (xReq *) stuff))
return Success;
#endif
acr.type = X_Reply; acr.type = X_Reply;
acr.length = 0; acr.length = 0;
acr.sequenceNumber = client->sequence; acr.sequenceNumber = client->sequence;
...@@ -2664,15 +2655,6 @@ ProcAllocNamedColor (register ClientPtr client) ...@@ -2664,15 +2655,6 @@ ProcAllocNamedColor (register ClientPtr client)
xAllocNamedColorReply ancr; xAllocNamedColorReply ancr;
#ifdef LBX
/*
* If the colormap is grabbed by a proxy, the server will have
* to regain control over the colormap. This AllocNamedColor request
* will be handled after the server gets back the colormap control.
*/
if (LbxCheckColorRequest (client, pcmp, (xReq *) stuff))
return Success;
#endif
ancr.type = X_Reply; ancr.type = X_Reply;
ancr.length = 0; ancr.length = 0;
ancr.sequenceNumber = client->sequence; ancr.sequenceNumber = client->sequence;
...@@ -2726,15 +2708,6 @@ ProcAllocColorCells (register ClientPtr client) ...@@ -2726,15 +2708,6 @@ ProcAllocColorCells (register ClientPtr client)
long length; long length;
Pixel *ppixels, *pmasks; Pixel *ppixels, *pmasks;
#ifdef LBX
/*
* If the colormap is grabbed by a proxy, the server will have
* to regain control over the colormap. This AllocColorCells request
* will be handled after the server gets back the colormap control.
*/
if (LbxCheckColorRequest (client, pcmp, (xReq *) stuff))
return Success;
#endif
npixels = stuff->colors; npixels = stuff->colors;
if (!npixels) if (!npixels)
{ {
...@@ -2801,15 +2774,6 @@ ProcAllocColorPlanes(register ClientPtr client) ...@@ -2801,15 +2774,6 @@ ProcAllocColorPlanes(register ClientPtr client)
long length; long length;
Pixel *ppixels; Pixel *ppixels;
#ifdef LBX
/*
* If the colormap is grabbed by a proxy, the server will have
* to regain control over the colormap. This AllocColorPlanes request
* will be handled after the server gets back the colormap control.
*/
if (LbxCheckColorRequest (client, pcmp, (xReq *) stuff))
return Success;
#endif
npixels = stuff->colors; npixels = stuff->colors;
if (!npixels) if (!npixels)
{ {
...@@ -3583,9 +3547,6 @@ CloseDownClient(register ClientPtr client) ...@@ -3583,9 +3547,6 @@ CloseDownClient(register ClientPtr client)
if (ClientIsAsleep(client)) if (ClientIsAsleep(client))
ClientSignal (client); ClientSignal (client);
ProcessWorkQueueZombies(); ProcessWorkQueueZombies();
#ifdef LBX
ProcessQTagZombies();
#endif
CloseDownConnection(client); CloseDownConnection(client);
/* If the client made it to the Running stage, nClients has /* If the client made it to the Running stage, nClients has
...@@ -3703,9 +3664,6 @@ void InitClient(ClientPtr client, int i, void * ospriv) ...@@ -3703,9 +3664,6 @@ void InitClient(ClientPtr client, int i, void * ospriv)
} }
#endif #endif
client->replyBytesRemaining = 0; client->replyBytesRemaining = 0;
#ifdef LBX
client->readRequest = StandardReadRequestFromClient;
#endif
#ifdef XCSECURITY #ifdef XCSECURITY
client->trustLevel = XSecurityClientTrusted; client->trustLevel = XSecurityClientTrusted;
client->CheckAccess = NULL; client->CheckAccess = NULL;
...@@ -3836,14 +3794,6 @@ ProcInitialConnection(register ClientPtr client) ...@@ -3836,14 +3794,6 @@ ProcInitialConnection(register ClientPtr client)
return (client->noClientException); return (client->noClientException);
} }
#ifdef LBX
void
IncrementClientCount()
{
nClients++;
}
#endif
int int
SendConnSetup(register ClientPtr client, char *reason) SendConnSetup(register ClientPtr client, char *reason)
{ {
......
...@@ -133,10 +133,6 @@ _NXGetFontPathError: ...@@ -133,10 +133,6 @@ _NXGetFontPathError:
#include "panoramiX.h" #include "panoramiX.h"
#endif #endif
#ifdef LBX
#include "lbxserve.h"
#endif
#ifdef XF86BIGFONT #ifdef XF86BIGFONT
#define _XF86BIGFONT_SERVER_ #define _XF86BIGFONT_SERVER_
#include <nx-X11/extensions/xf86bigfont.h> #include <nx-X11/extensions/xf86bigfont.h>
...@@ -557,9 +553,6 @@ CloseFont(void * value, XID fid) ...@@ -557,9 +553,6 @@ CloseFont(void * value, XID fid)
} }
if (pfont == defaultFont) if (pfont == defaultFont)
defaultFont = NULL; defaultFont = NULL;
#ifdef LBX
LbxFreeFontTag(pfont);
#endif
#ifdef XF86BIGFONT #ifdef XF86BIGFONT
XF86BigfontFreeFontShm(pfont); XF86BigfontFreeFontShm(pfont);
#endif #endif
......
...@@ -65,9 +65,6 @@ SOFTWARE. ...@@ -65,9 +65,6 @@ SOFTWARE.
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/security.h> #include <nx-X11/extensions/security.h>
#endif #endif
#ifdef LBX
#include "lbxserve.h"
#endif
#define EXTENSION_BASE 128 #define EXTENSION_BASE 128
#define EXTENSION_EVENT_BASE 64 #define EXTENSION_EVENT_BASE 64
...@@ -154,9 +151,6 @@ AddExtension(char *name, int NumEvents, int NumErrors, ...@@ -154,9 +151,6 @@ AddExtension(char *name, int NumEvents, int NumErrors,
ext->secure = FALSE; ext->secure = FALSE;
#endif #endif
#ifdef LBX
(void) LbxAddExtension(name, ext->base, ext->eventBase, ext->errorBase);
#endif
return(ext); return(ext);
} }
...@@ -176,11 +170,7 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) ...@@ -176,11 +170,7 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
strcpy(name, alias); strcpy(name, alias);
ext->aliases[ext->num_aliases] = name; ext->aliases[ext->num_aliases] = name;
ext->num_aliases++; ext->num_aliases++;
#ifdef LBX
return LbxAddExtensionAlias(ext->index, alias);
#else
return TRUE; return TRUE;
#endif
} }
static int static int
...@@ -241,9 +231,6 @@ DeclareExtensionSecurity(char *extname, Bool secure) ...@@ -241,9 +231,6 @@ DeclareExtensionSecurity(char *extname, Bool secure)
} }
} }
#endif #endif
#ifdef LBX
LbxDeclareExtensionSecurity(extname, secure);
#endif
} }
unsigned short unsigned short
...@@ -271,10 +258,6 @@ CloseDownExtensions() ...@@ -271,10 +258,6 @@ CloseDownExtensions()
{ {
register int i,j; register int i,j;
#ifdef LBX
LbxCloseDownExtensions();
#endif
for (i = NumExtensions - 1; i >= 0; i--) for (i = NumExtensions - 1; i >= 0; i--)
{ {
(* extensions[i]->CloseDown)(extensions[i]); (* extensions[i]->CloseDown)(extensions[i]);
......
...@@ -64,19 +64,6 @@ SOFTWARE. ...@@ -64,19 +64,6 @@ SOFTWARE.
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/security.h> #include <nx-X11/extensions/security.h>
#endif #endif
#ifdef LBX
#include "lbxserve.h"
#include "lbxtags.h"
#endif
#if defined(LBX) || defined(LBX_COMPAT)
#if 0 /* no header in X11 environment, not used in X11 environment */
int fWriteToClient(ClientPtr client, int len, char *buf)
{
return WriteToClient(client, len, buf);
}
#endif
#endif
/***************************************************************** /*****************************************************************
* Property Stuff * Property Stuff
...@@ -261,13 +248,8 @@ ProcChangeProperty(ClientPtr client) ...@@ -261,13 +248,8 @@ ProcChangeProperty(ClientPtr client)
} }
#endif #endif
#ifdef LBX
err = LbxChangeWindowProperty(client, pWin, stuff->property, stuff->type,
(int)format, (int)mode, len, TRUE, (void *)&stuff[1], TRUE, NULL);
#else
err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format,
(int)mode, len, (void *)&stuff[1], TRUE); (int)mode, len, (void *)&stuff[1], TRUE);
#endif
if (err != Success) if (err != Success)
return err; return err;
else else
...@@ -279,11 +261,6 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, ...@@ -279,11 +261,6 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
int mode, unsigned long len, void * value, int mode, unsigned long len, void * value,
Bool sendevent) Bool sendevent)
{ {
#ifdef LBX
return LbxChangeWindowProperty(NULL, pWin, property, type,
format, mode, len, TRUE, value,
sendevent, NULL);
#else
PropertyPtr pProp; PropertyPtr pProp;
xEvent event; xEvent event;
int sizeInBytes; int sizeInBytes;
...@@ -390,7 +367,6 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, ...@@ -390,7 +367,6 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
DeliverEvents(pWin, &event, 1, (WindowPtr)NULL); DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
} }
return(Success); return(Success);
#endif
} }
int int
...@@ -420,10 +396,6 @@ DeleteProperty(WindowPtr pWin, Atom propName) ...@@ -420,10 +396,6 @@ DeleteProperty(WindowPtr pWin, Atom propName)
{ {
prevProp->next = pProp->next; prevProp->next = pProp->next;
} }
#ifdef LBX
if (pProp->tag_id)
TagDeleteTag(pProp->tag_id);
#endif
event.u.u.type = PropertyNotify; event.u.u.type = PropertyNotify;
event.u.property.window = pWin->drawable.id; event.u.property.window = pWin->drawable.id;
event.u.property.state = PropertyDelete; event.u.property.state = PropertyDelete;
...@@ -445,10 +417,6 @@ DeleteAllWindowProperties(WindowPtr pWin) ...@@ -445,10 +417,6 @@ DeleteAllWindowProperties(WindowPtr pWin)
pProp = wUserProps (pWin); pProp = wUserProps (pWin);
while (pProp) while (pProp)
{ {
#ifdef LBX
if (pProp->tag_id)
TagDeleteTag(pProp->tag_id);
#endif
event.u.u.type = PropertyNotify; event.u.u.type = PropertyNotify;
event.u.property.window = pWin->drawable.id; event.u.property.window = pWin->drawable.id;
event.u.property.state = PropertyDelete; event.u.property.state = PropertyDelete;
...@@ -570,13 +538,6 @@ ProcGetProperty(ClientPtr client) ...@@ -570,13 +538,6 @@ ProcGetProperty(ClientPtr client)
WriteReplyToClient(client, sizeof(xGenericReply), &reply); WriteReplyToClient(client, sizeof(xGenericReply), &reply);
return(Success); return(Success);
} }
#ifdef LBX
/* make sure we have the current value */
if (pProp->tag_id && pProp->owner_pid) {
LbxStallPropRequest(client, pProp);
return client->noClientException;
}
#endif
/* /*
* Return type, format, value to client * Return type, format, value to client
...@@ -627,10 +588,6 @@ ProcGetProperty(ClientPtr client) ...@@ -627,10 +588,6 @@ ProcGetProperty(ClientPtr client)
if (stuff->delete && (reply.bytesAfter == 0)) if (stuff->delete && (reply.bytesAfter == 0))
{ /* delete the Property */ { /* delete the Property */
#ifdef LBX
if (pProp->tag_id)
TagDeleteTag(pProp->tag_id);
#endif
if (prevProp == (PropertyPtr)NULL) /* takes care of head */ if (prevProp == (PropertyPtr)NULL) /* takes care of head */
{ {
if (!(pWin->optional->userProps = pProp->next)) if (!(pWin->optional->userProps = pProp->next))
......
...@@ -65,11 +65,9 @@ SOFTWARE. ...@@ -65,11 +65,9 @@ SOFTWARE.
static void SwapFontInfo(xQueryFontReply *pr); static void SwapFontInfo(xQueryFontReply *pr);
#ifndef LBX
static void SwapCharInfo(xCharInfo *pInfo); static void SwapCharInfo(xCharInfo *pInfo);
static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs); static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs);
#endif
/** /**
* Thanks to Jack Palevich for testing and subsequently rewriting all this * Thanks to Jack Palevich for testing and subsequently rewriting all this
...@@ -391,9 +389,7 @@ SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep) ...@@ -391,9 +389,7 @@ SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
(void)WriteToClient(pClient, size, (char *) pRep); (void)WriteToClient(pClient, size, (char *) pRep);
} }
#ifndef LBX
static static
#endif
void void
SwapCharInfo(xCharInfo *pInfo) SwapCharInfo(xCharInfo *pInfo)
{ {
...@@ -423,9 +419,7 @@ SwapFontInfo(xQueryFontReply *pr) ...@@ -423,9 +419,7 @@ SwapFontInfo(xQueryFontReply *pr)
swapl(&pr->nCharInfos, n); swapl(&pr->nCharInfos, n);
} }
#ifndef LBX
static static
#endif
void void
SwapFont(xQueryFontReply *pr, Bool hasGlyphs) SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
{ {
......
...@@ -375,10 +375,6 @@ extern int DoGetImage( ...@@ -375,10 +375,6 @@ extern int DoGetImage(
Mask /*planemask*/, Mask /*planemask*/,
xGetImageReply ** /*im_return*/); xGetImageReply ** /*im_return*/);
#ifdef LBX
extern void IncrementClientCount(void);
#endif /* LBX */
#if defined(DDXBEFORERESET) #if defined(DDXBEFORERESET)
extern void ddxBeforeReset (void); extern void ddxBeforeReset (void);
#endif #endif
......
...@@ -129,9 +129,6 @@ typedef struct _Client { ...@@ -129,9 +129,6 @@ typedef struct _Client {
unsigned char requestLog[MAX_REQUEST_LOG]; unsigned char requestLog[MAX_REQUEST_LOG];
int requestLogIndex; int requestLogIndex;
#endif #endif
#ifdef LBX
int (*readRequest)(ClientPtr /*client*/);
#endif
unsigned long replyBytesRemaining; unsigned long replyBytesRemaining;
#ifdef XCSECURITY #ifdef XCSECURITY
XID authId; XID authId;
......
...@@ -77,10 +77,6 @@ extern Bool noDPMSExtension; ...@@ -77,10 +77,6 @@ extern Bool noDPMSExtension;
extern Bool noGlxExtension; extern Bool noGlxExtension;
#endif #endif
#ifdef LBX
extern Bool noLbxExtension;
#endif
#ifdef SCREENSAVER #ifdef SCREENSAVER
extern Bool noScreenSaverExtension; extern Bool noScreenSaverExtension;
#endif #endif
......
...@@ -113,14 +113,7 @@ extern int WaitForSomething( ...@@ -113,14 +113,7 @@ extern int WaitForSomething(
int* /*pClientsReady*/ int* /*pClientsReady*/
); );
#ifdef LBX
#define ReadRequestFromClient(client) ((client)->readRequest(client))
extern int StandardReadRequestFromClient(ClientPtr /*client*/);
extern int ClientConnectionNumber(ClientPtr /*client*/);
#else
extern int ReadRequestFromClient(ClientPtr /*client*/); extern int ReadRequestFromClient(ClientPtr /*client*/);
#endif /* LBX */
extern Bool InsertFakeRequest( extern Bool InsertFakeRequest(
ClientPtr /*client*/, ClientPtr /*client*/,
...@@ -180,10 +173,6 @@ extern void MakeClientGrabImpervious(ClientPtr /*client*/); ...@@ -180,10 +173,6 @@ extern void MakeClientGrabImpervious(ClientPtr /*client*/);
extern void MakeClientGrabPervious(ClientPtr /*client*/); extern void MakeClientGrabPervious(ClientPtr /*client*/);
#ifdef LBX
extern void CloseDownFileDescriptor(ClientPtr /* client */);
#endif
extern void AvailableClientInput(ClientPtr /* client */); extern void AvailableClientInput(ClientPtr /* client */);
extern CARD32 GetTimeInMillis(void); extern CARD32 GetTimeInMillis(void);
......
...@@ -62,14 +62,6 @@ typedef struct _Property { ...@@ -62,14 +62,6 @@ typedef struct _Property {
short format; /* format of data for swapping - 8,16,32 */ short format; /* format of data for swapping - 8,16,32 */
long size; /* size of data in (format/8) bytes */ long size; /* size of data in (format/8) bytes */
void *data; /* private to client */ void *data; /* private to client */
#if defined(LBX) || defined(LBX_COMPAT)
/* If space is at a premium and binary compatibility is not
* an issue, you may want to put the owner_pid next to format
* so that the two shorts pack together without padding.
*/
short owner_pid; /* proxy that has the data */
XID tag_id;
#endif
} PropertyRec; } PropertyRec;
#endif /* PROPERTYSTRUCT_H */ #endif /* PROPERTYSTRUCT_H */
......
...@@ -120,17 +120,6 @@ extern void SQueryKeymapReply( ...@@ -120,17 +120,6 @@ extern void SQueryKeymapReply(
int /* size */, int /* size */,
xQueryKeymapReply * /* pRep */); xQueryKeymapReply * /* pRep */);
#ifdef LBX
extern void SwapCharInfo(
xCharInfo * /* pInfo */);
#endif
#ifdef LBX
extern void SwapFont(
xQueryFontReply * /* pr */,
Bool /* hasGlyphs */);
#endif
extern void SQueryFontReply( extern void SQueryFontReply(
ClientPtr /* pClient */, ClientPtr /* pClient */,
int /* size */, int /* size */,
......
...@@ -96,9 +96,6 @@ extern Bool noDPMSExtension; ...@@ -96,9 +96,6 @@ extern Bool noDPMSExtension;
#ifdef GLXEXT #ifdef GLXEXT
extern Bool noGlxExtension; extern Bool noGlxExtension;
#endif #endif
#ifdef LBX
extern Bool noLbxExtension;
#endif
#ifdef SCREENSAVER #ifdef SCREENSAVER
extern Bool noScreenSaverExtension; extern Bool noScreenSaverExtension;
#endif #endif
...@@ -185,10 +182,6 @@ typedef void (*InitExtension)(INITARGS); ...@@ -185,10 +182,6 @@ typedef void (*InitExtension)(INITARGS);
#ifdef XKB #ifdef XKB
#include <nx-X11/extensions/XKB.h> #include <nx-X11/extensions/XKB.h>
#endif #endif
#ifdef LBX
#define _XLBX_SERVER_
#include <nx-X11/extensions/lbxstr.h>
#endif
#ifdef XCSECURITY #ifdef XCSECURITY
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/securstr.h> #include <nx-X11/extensions/securstr.h>
...@@ -256,9 +249,6 @@ extern void XCMiscExtensionInit(INITARGS); ...@@ -256,9 +249,6 @@ extern void XCMiscExtensionInit(INITARGS);
#ifdef XRECORD #ifdef XRECORD
extern void RecordExtensionInit(INITARGS); extern void RecordExtensionInit(INITARGS);
#endif #endif
#ifdef LBX
extern void LbxExtensionInit(INITARGS);
#endif
#ifdef DBE #ifdef DBE
extern void DbeExtensionInit(INITARGS); extern void DbeExtensionInit(INITARGS);
#endif #endif
...@@ -349,9 +339,6 @@ static ExtensionToggle ExtensionToggleList[] = ...@@ -349,9 +339,6 @@ static ExtensionToggle ExtensionToggleList[] =
#ifdef GLXEXT #ifdef GLXEXT
{ "GLX", &noGlxExtension }, { "GLX", &noGlxExtension },
#endif #endif
#ifdef LBX
{ "LBX", &noLbxExtension },
#endif
#ifdef SCREENSAVER #ifdef SCREENSAVER
{ "MIT-SCREEN-SAVER", &noScreenSaverExtension }, { "MIT-SCREEN-SAVER", &noScreenSaverExtension },
#endif #endif
...@@ -508,9 +495,6 @@ InitExtensions(argc, argv) ...@@ -508,9 +495,6 @@ InitExtensions(argc, argv)
#ifdef XRECORD #ifdef XRECORD
if (!noTestExtensions) RecordExtensionInit(); if (!noTestExtensions) RecordExtensionInit();
#endif #endif
#ifdef LBX
if (!noLbxExtension) LbxExtensionInit();
#endif
#ifdef DBE #ifdef DBE
if (!noDbeExtension) DbeExtensionInit(); if (!noDbeExtension) DbeExtensionInit();
#endif #endif
...@@ -602,9 +586,6 @@ static ExtensionModule staticExtensions[] = { ...@@ -602,9 +586,6 @@ static ExtensionModule staticExtensions[] = {
#ifdef XKB #ifdef XKB
{ XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL }, { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
#endif #endif
#ifdef LBX
{ LbxExtensionInit, LBXNAME, &noLbxExtension, NULL, NULL },
#endif
#ifdef XCSECURITY #ifdef XCSECURITY
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
#endif #endif
......
...@@ -1390,10 +1390,6 @@ Bool LocalClient(ClientPtr client) ...@@ -1390,10 +1390,6 @@ Bool LocalClient(ClientPtr client)
return FALSE; return FALSE;
} }
#endif #endif
#ifdef LBX
if (!((OsCommPtr)client->osPrivate)->trans_conn)
return FALSE;
#endif
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn, if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
&notused, &alen, &from)) &notused, &alen, &from))
{ {
......
...@@ -151,12 +151,6 @@ extern __const__ int _nfiles; ...@@ -151,12 +151,6 @@ extern __const__ int _nfiles;
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/security.h> #include <nx-X11/extensions/security.h>
#endif #endif
#ifdef LBX
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
#include "osdep.h"
#endif
#ifdef X_NOT_POSIX #ifdef X_NOT_POSIX
#define Pid_t int #define Pid_t int
...@@ -297,12 +291,10 @@ int ListenTransCount; ...@@ -297,12 +291,10 @@ int ListenTransCount;
static void ErrorConnMax(XtransConnInfo /* trans_conn */); static void ErrorConnMax(XtransConnInfo /* trans_conn */);
#ifndef LBX
static static
void CloseDownFileDescriptor( void CloseDownFileDescriptor(
OsCommPtr /*oc*/ OsCommPtr /*oc*/
); );
#endif
static XtransConnInfo static XtransConnInfo
...@@ -691,64 +683,13 @@ ClientAuthorized(ClientPtr client, ...@@ -691,64 +683,13 @@ ClientAuthorized(ClientPtr client,
char *reason = NULL; char *reason = NULL;
XtransConnInfo trans_conn; XtransConnInfo trans_conn;
int restore_trans_conn = 0; int restore_trans_conn = 0;
ClientPtr lbxpc = NULL;
priv = (OsCommPtr)client->osPrivate; priv = (OsCommPtr)client->osPrivate;
trans_conn = priv->trans_conn; trans_conn = priv->trans_conn;
#ifdef LBX
if (!trans_conn) {
/*
* Since trans_conn is NULL, this must be a proxy's client for
* which we have NO address. Therefore, we will temporarily
* set the client's trans_conn to the proxy's trans_conn and
* after CheckAuthorization the client's trans_conn will be
* restored.
*
* If XDM-AUTHORIZATION-1 is being used, CheckAuthorization
* will eventually call XdmAuthorizationValidate and this
* later function may use the client's trans_conn to get the
* client's address. Since a XDM-AUTH-1 auth string includes
* the client's address, this address is compared to the address
* in the client's trans_conn. If the proxy and client are
* on the same host, the comparison will fail; otherwise the
* comparison will fail and the client will not be authorized
* to connect to the server.
*
* The basis for this additional code is to prevent a
* NULL pointer dereference of the client's trans_conn.
* The fundamental problem - the fact that the client's
* trans_conn is NULL - is because the NewClient
* request in version 1.0 of the LBX protocol does not
* send the client's address to the server. When the
* spec is changed and the client's address is sent to
* server in the NewClient request, this additional code
* should be removed.
*
* See defect number XWSog08218 for more information.
*/
lbxpc = LbxProxyClient(priv->proxy);
trans_conn = ((OsCommPtr)lbxpc->osPrivate)->trans_conn;
priv->trans_conn = trans_conn;
restore_trans_conn = 1;
}
#endif
auth_id = CheckAuthorization (proto_n, auth_proto, auth_id = CheckAuthorization (proto_n, auth_proto,
string_n, auth_string, client, &reason); string_n, auth_string, client, &reason);
#ifdef LBX
if (! priv->trans_conn) {
if (auth_id == (XID) ~0L && !GetAccessControl())
auth_id = ((OsCommPtr)lbxpc->osPrivate)->auth_id;
#ifdef XCSECURITY
else if (auth_id != (XID) ~0L && !SecuritySameLevel(lbxpc, auth_id)) {
auth_id = (XID) ~0L;
reason = "Client trust level differs from that of LBX Proxy";
}
#endif
}
#endif
if (auth_id == (XID) ~0L) if (auth_id == (XID) ~0L)
{ {
if ( if (
...@@ -760,9 +701,6 @@ ClientAuthorized(ClientPtr client, ...@@ -760,9 +701,6 @@ ClientAuthorized(ClientPtr client,
&family, &fromlen, &from) != -1) &family, &fromlen, &from) != -1)
{ {
if ( if (
#ifdef LBX
!trans_conn ||
#endif
InvalidHost ((struct sockaddr *) from, fromlen, client)) InvalidHost ((struct sockaddr *) from, fromlen, client))
AuthAudit(client, FALSE, (struct sockaddr *) from, AuthAudit(client, FALSE, (struct sockaddr *) from,
fromlen, proto_n, auth_proto, auth_id); fromlen, proto_n, auth_proto, auth_id);
...@@ -779,14 +717,6 @@ ClientAuthorized(ClientPtr client, ...@@ -779,14 +717,6 @@ ClientAuthorized(ClientPtr client,
} }
if (auth_id == (XID) ~0L) { if (auth_id == (XID) ~0L) {
#ifdef LBX
/*
* Restore client's trans_conn state
*/
if (restore_trans_conn) {
priv->trans_conn = NULL;
}
#endif
if (reason) if (reason)
return reason; return reason;
else else
...@@ -817,34 +747,16 @@ ClientAuthorized(ClientPtr client, ...@@ -817,34 +747,16 @@ ClientAuthorized(ClientPtr client,
* true purpose of the selfhosts list is to see who may change the * true purpose of the selfhosts list is to see who may change the
* access control list. * access control list.
*/ */
#ifdef LBX
if (restore_trans_conn) {
priv->trans_conn = NULL;
}
#endif
return((char *)NULL); return((char *)NULL);
} }
static ClientPtr static ClientPtr
#ifdef LBX
AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time,
int (*Flush)(
ClientPtr /*who*/, OsCommPtr /*oc*/,
char * /*extraBuf*/, int /*extraCount*/),
void (*Close)(
ClientPtr /*client*/),
LbxProxyPtr proxy)
#else
AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
#endif
{ {
OsCommPtr oc; OsCommPtr oc;
ClientPtr client; ClientPtr client;
if ( if (
#ifdef LBX
trans_conn &&
#endif
#ifndef WIN32 #ifndef WIN32
fd >= lastfdesc fd >= lastfdesc
#else #else
...@@ -861,20 +773,11 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) ...@@ -861,20 +773,11 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
oc->output = (ConnectionOutputPtr)NULL; oc->output = (ConnectionOutputPtr)NULL;
oc->auth_id = None; oc->auth_id = None;
oc->conn_time = conn_time; oc->conn_time = conn_time;
#ifdef LBX
oc->proxy = proxy;
oc->Flush = Flush;
oc->Close = Close;
oc->largereq = (ConnectionInputPtr) NULL;
#endif
if (!(client = NextAvailableClient((void *)oc))) if (!(client = NextAvailableClient((void *)oc)))
{ {
xfree (oc); xfree (oc);
return NullClient; return NullClient;
} }
#ifdef LBX
if (trans_conn)
#endif
{ {
#if !defined(WIN32) #if !defined(WIN32)
ConnectionTranslation[fd] = client->index; ConnectionTranslation[fd] = client->index;
...@@ -901,39 +804,6 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) ...@@ -901,39 +804,6 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
return client; return client;
} }
#ifdef LBX
int
ClientConnectionNumber (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
return oc->fd;
}
ClientPtr
AllocLbxClientConnection (ClientPtr client, LbxProxyPtr proxy)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
return AllocNewConnection ((XtransConnInfo)NULL, oc->fd, GetTimeInMillis(),
LbxFlushClient, LbxCloseClient, proxy);
}
void
LbxProxyConnection (ClientPtr client, LbxProxyPtr proxy)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
FlushClient(client, oc, (char *)NULL, 0);
oc->proxy = proxy;
oc->Flush = LbxFlushClient;
oc->Close = LbxCloseClient;
LbxPrimeInput(client, proxy);
}
#endif
/***************** /*****************
* EstablishNewConnections * EstablishNewConnections
* If anyone is waiting on listened sockets, accept them. * If anyone is waiting on listened sockets, accept them.
...@@ -1013,10 +883,6 @@ EstablishNewConnections(ClientPtr clientUnused, void * closure) ...@@ -1013,10 +883,6 @@ EstablishNewConnections(ClientPtr clientUnused, void * closure)
_XSERVTransSetOption(new_trans_conn, TRANS_NONBLOCKING, 1); _XSERVTransSetOption(new_trans_conn, TRANS_NONBLOCKING, 1);
if (!AllocNewConnection (new_trans_conn, newconn, connect_time if (!AllocNewConnection (new_trans_conn, newconn, connect_time
#ifdef LBX
, StandardFlushClient,
CloseDownFileDescriptor, (LbxProxyPtr)NULL
#endif
)) ))
{ {
ErrorConnMax(new_trans_conn); ErrorConnMax(new_trans_conn);
...@@ -1086,27 +952,17 @@ ErrorConnMax(XtransConnInfo trans_conn) ...@@ -1086,27 +952,17 @@ ErrorConnMax(XtransConnInfo trans_conn)
* Remove this file descriptor and it's I/O buffers, etc. * Remove this file descriptor and it's I/O buffers, etc.
************/ ************/
#ifdef LBX
void
CloseDownFileDescriptor(ClientPtr client)
#else
static void static void
CloseDownFileDescriptor(OsCommPtr oc) CloseDownFileDescriptor(OsCommPtr oc)
#endif
{ {
#ifdef LBX
OsCommPtr oc = (OsCommPtr) client->osPrivate;
#endif
int connection = oc->fd; int connection = oc->fd;
if (oc->trans_conn) { if (oc->trans_conn) {
_XSERVTransDisconnect(oc->trans_conn); _XSERVTransDisconnect(oc->trans_conn);
_XSERVTransClose(oc->trans_conn); _XSERVTransClose(oc->trans_conn);
} }
#ifndef LBX
FreeOsBuffers(oc); FreeOsBuffers(oc);
xfree(oc); xfree(oc);
#endif
#ifndef WIN32 #ifndef WIN32
ConnectionTranslation[connection] = 0; ConnectionTranslation[connection] = 0;
#else #else
...@@ -1201,13 +1057,7 @@ CloseDownConnection(ClientPtr client) ...@@ -1201,13 +1057,7 @@ CloseDownConnection(ClientPtr client)
#ifdef XDMCP #ifdef XDMCP
XdmcpCloseDisplay(oc->fd); XdmcpCloseDisplay(oc->fd);
#endif #endif
#ifndef LBX
CloseDownFileDescriptor(oc); CloseDownFileDescriptor(oc);
#else
(*oc->Close) (client);
FreeOsBuffers(oc);
xfree(oc);
#endif
client->osPrivate = (void *)NULL; client->osPrivate = (void *)NULL;
if (auditTrailLevel > 1) if (auditTrailLevel > 1)
AuditF("client %d disconnected\n", client->index); AuditF("client %d disconnected\n", client->index);
...@@ -1296,17 +1146,8 @@ IgnoreClient (ClientPtr client) ...@@ -1296,17 +1146,8 @@ IgnoreClient (ClientPtr client)
{ {
OsCommPtr oc = (OsCommPtr)client->osPrivate; OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd; int connection = oc->fd;
#ifdef LBX
LbxClientPtr lbxClient = LbxClient(client);
#endif
isItTimeToYield = TRUE; isItTimeToYield = TRUE;
#ifdef LBX
if (lbxClient) {
lbxClient->ignored = TRUE;
return;
}
#endif
if (!GrabInProgress || FD_ISSET(connection, &AllClients)) if (!GrabInProgress || FD_ISSET(connection, &AllClients))
{ {
if (FD_ISSET (connection, &ClientsWithInput)) if (FD_ISSET (connection, &ClientsWithInput))
...@@ -1340,14 +1181,6 @@ AttendClient (ClientPtr client) ...@@ -1340,14 +1181,6 @@ AttendClient (ClientPtr client)
{ {
OsCommPtr oc = (OsCommPtr)client->osPrivate; OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd; int connection = oc->fd;
#ifdef LBX
LbxClientPtr lbxClient = LbxClient(client);
if (lbxClient) {
lbxClient->ignored = FALSE;
return;
}
#endif
if (!GrabInProgress || GrabInProgress == client->index || if (!GrabInProgress || GrabInProgress == client->index ||
FD_ISSET(connection, &GrabImperviousClients)) FD_ISSET(connection, &GrabImperviousClients))
{ {
......
...@@ -85,11 +85,6 @@ SOFTWARE. ...@@ -85,11 +85,6 @@ SOFTWARE.
#include "opaque.h" #include "opaque.h"
#include "dixstruct.h" #include "dixstruct.h"
#include "misc.h" #include "misc.h"
#ifdef LBX
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
#endif
CallbackListPtr ReplyCallback; CallbackListPtr ReplyCallback;
CallbackListPtr FlushCallback; CallbackListPtr FlushCallback;
...@@ -200,26 +195,9 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL; ...@@ -200,26 +195,9 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL;
#define YieldControlDeath() \ #define YieldControlDeath() \
{ timesThisConnection = 0; } { timesThisConnection = 0; }
#ifdef hpux_not_tog
#define LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
#endif
#ifdef LBX
#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
#undef ReadRequestFromClient
int int
ReadRequestFromClient(ClientPtr client) ReadRequestFromClient(ClientPtr client)
{ {
return (*client->readRequest)(client);
}
#endif
int
StandardReadRequestFromClient(ClientPtr client)
#else
int
ReadRequestFromClient(ClientPtr client)
#endif
{
OsCommPtr oc = (OsCommPtr)client->osPrivate; OsCommPtr oc = (OsCommPtr)client->osPrivate;
ConnectionInputPtr oci = oc->input; ConnectionInputPtr oci = oc->input;
int fd = oc->fd; int fd = oc->fd;
...@@ -368,13 +346,6 @@ ReadRequestFromClient(ClientPtr client) ...@@ -368,13 +346,6 @@ ReadRequestFromClient(ClientPtr client)
YieldControlDeath(); YieldControlDeath();
return -1; return -1;
} }
#ifdef LBX
if (oc->proxy && oc->proxy->compHandle)
result = (*oc->proxy->streamOpts.streamCompRead)(fd,
(unsigned char *)oci->buffer + oci->bufcnt,
oci->size - oci->bufcnt);
else
#endif
result = _XSERVTransRead(oc->trans_conn, oci->buffer + oci->bufcnt, result = _XSERVTransRead(oc->trans_conn, oci->buffer + oci->bufcnt,
oci->size - oci->bufcnt); oci->size - oci->bufcnt);
if (result <= 0) if (result <= 0)
...@@ -382,18 +353,8 @@ ReadRequestFromClient(ClientPtr client) ...@@ -382,18 +353,8 @@ ReadRequestFromClient(ClientPtr client)
if ((result < 0) && ETEST(errno)) if ((result < 0) && ETEST(errno))
{ {
#if defined(SVR4) && defined(i386) && !defined(sun) #if defined(SVR4) && defined(i386) && !defined(sun)
#if defined(LBX) && 0
/*
* For LBX connections, we can get a valid EWOULDBLOCK
* There is probably a better way of distinguishing LBX
* connections, but this works. (DHD)
*/
extern int LbxRead();
if (oc->Read == LbxRead)
#else
if (0) if (0)
#endif #endif
#endif
{ {
YieldControlNoInput(); YieldControlNoInput();
return 0; return 0;
...@@ -610,18 +571,6 @@ ResetCurrentRequest(ClientPtr client) ...@@ -610,18 +571,6 @@ ResetCurrentRequest(ClientPtr client)
int fd = oc->fd; int fd = oc->fd;
register xReq *request; register xReq *request;
int gotnow, needed; int gotnow, needed;
#ifdef LBX
LbxClientPtr lbxClient = LbxClient(client);
if (lbxClient) {
LbxSetForBlock(lbxClient);
if (!oci) {
AppendFakeRequest(client,
client->requestBuffer, client->req_len << 2);
return;
}
}
#endif
if (AvailableInput == oc) if (AvailableInput == oc)
AvailableInput = (OsCommPtr)NULL; AvailableInput = (OsCommPtr)NULL;
oci->lenLastReq = 0; oci->lenLastReq = 0;
...@@ -851,9 +800,6 @@ FlushAllOutput(void) ...@@ -851,9 +800,6 @@ FlushAllOutput(void)
continue; continue;
oc = (OsCommPtr)client->osPrivate; oc = (OsCommPtr)client->osPrivate;
if ( if (
#ifdef LBX
!oc->proxy &&
#endif
FD_ISSET(oc->fd, &ClientsWithInput)) FD_ISSET(oc->fd, &ClientsWithInput))
{ {
FD_SET(oc->fd, &OutputPending); /* set the bit again */ FD_SET(oc->fd, &OutputPending); /* set the bit again */
...@@ -875,9 +821,6 @@ FlushAllOutput(void) ...@@ -875,9 +821,6 @@ FlushAllOutput(void)
continue; continue;
oc = (OsCommPtr)client->osPrivate; oc = (OsCommPtr)client->osPrivate;
if ( if (
#ifdef LBX
!oc->proxy &&
#endif
FD_ISSET(oc->fd, &ClientsWithInput)) FD_ISSET(oc->fd, &ClientsWithInput))
{ {
FD_SET(oc->fd, &newOutputPending); /* set the bit again */ FD_SET(oc->fd, &newOutputPending); /* set the bit again */
...@@ -1055,22 +998,8 @@ WriteToClient (ClientPtr who, int count, char *buf) ...@@ -1055,22 +998,8 @@ WriteToClient (ClientPtr who, int count, char *buf)
* *
**********************/ **********************/
#ifdef LBX
#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
#undef FlushClient
int
FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
{
return (*oc->Flush)(who, oc, extraBuf, extraCount);
}
#endif
int
StandardFlushClient(ClientPtr who, OsCommPtr oc,
char *extraBuf, int extraCount)
#else
int int
FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount) FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
#endif
{ {
ConnectionOutputPtr oco = oc->output; ConnectionOutputPtr oco = oc->output;
int connection = oc->fd; int connection = oc->fd;
...@@ -1274,9 +1203,6 @@ AllocateOutputBuffer(void) ...@@ -1274,9 +1203,6 @@ AllocateOutputBuffer(void)
} }
oco->size = BUFSIZE; oco->size = BUFSIZE;
oco->count = 0; oco->count = 0;
#ifdef LBX
oco->nocompress = FALSE;
#endif
return oco; return oco;
} }
...@@ -1318,12 +1244,6 @@ FreeOsBuffers(OsCommPtr oc) ...@@ -1318,12 +1244,6 @@ FreeOsBuffers(OsCommPtr oc)
oco->count = 0; oco->count = 0;
} }
} }
#ifdef LBX
if ((oci = oc->largereq)) {
xfree(oci->buffer);
xfree(oci);
}
#endif
} }
void void
......
...@@ -143,9 +143,6 @@ typedef struct _connectionOutput { ...@@ -143,9 +143,6 @@ typedef struct _connectionOutput {
int size; int size;
unsigned char *buf; unsigned char *buf;
int count; int count;
#ifdef LBX
Bool nocompress;
#endif
} ConnectionOutput, *ConnectionOutputPtr; } ConnectionOutput, *ConnectionOutputPtr;
#ifdef K5AUTH #ifdef K5AUTH
...@@ -158,10 +155,6 @@ typedef struct _k5_state { ...@@ -158,10 +155,6 @@ typedef struct _k5_state {
} k5_state; } k5_state;
#endif #endif
#ifdef LBX
typedef struct _LbxProxy *OsProxyPtr;
#endif
struct _osComm; struct _osComm;
#define AuthInitArgs void #define AuthInitArgs void
...@@ -202,33 +195,14 @@ typedef struct _osComm { ...@@ -202,33 +195,14 @@ typedef struct _osComm {
#endif #endif
CARD32 conn_time; /* timestamp if not established, else 0 */ CARD32 conn_time; /* timestamp if not established, else 0 */
struct _XtransConnInfo *trans_conn; /* transport connection object */ struct _XtransConnInfo *trans_conn; /* transport connection object */
#ifdef LBX
OsProxyPtr proxy;
ConnectionInputPtr largereq;
OsCloseFunc Close;
OsFlushFunc Flush;
#endif
} OsCommRec, *OsCommPtr; } OsCommRec, *OsCommPtr;
#ifdef LBX
#define FlushClient(who, oc, extraBuf, extraCount) \
(*(oc)->Flush)(who, oc, extraBuf, extraCount)
extern int StandardFlushClient(
ClientPtr /*who*/,
OsCommPtr /*oc*/,
char* /*extraBuf*/,
int /*extraCount*/
);
extern int LbxFlushClient(ClientPtr /*who*/, OsCommPtr /*oc*/,
char * /*extraBuf*/, int /*extraCount*/);
#else
extern int FlushClient( extern int FlushClient(
ClientPtr /*who*/, ClientPtr /*who*/,
OsCommPtr /*oc*/, OsCommPtr /*oc*/,
char* /*extraBuf*/, char* /*extraBuf*/,
int /*extraCount*/ int /*extraCount*/
); );
#endif
extern void FreeOsBuffers( extern void FreeOsBuffers(
OsCommPtr /*oc*/ OsCommPtr /*oc*/
......
...@@ -171,9 +171,6 @@ Bool noDPMSExtension = FALSE; ...@@ -171,9 +171,6 @@ Bool noDPMSExtension = FALSE;
#ifdef GLXEXT #ifdef GLXEXT
Bool noGlxExtension = FALSE; Bool noGlxExtension = FALSE;
#endif #endif
#ifdef LBX
Bool noLbxExtension = FALSE;
#endif
#ifdef SCREENSAVER #ifdef SCREENSAVER
Bool noScreenSaverExtension = FALSE; Bool noScreenSaverExtension = FALSE;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment