aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/record
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/record
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/record')
-rw-r--r--xorg-server/record/Makefile.in35
-rw-r--r--xorg-server/record/record.c60
2 files changed, 61 insertions, 34 deletions
diff --git a/xorg-server/record/Makefile.in b/xorg-server/record/Makefile.in
index 8d4b8dc44..59bdd5f99 100644
--- a/xorg-server/record/Makefile.in
+++ b/xorg-server/record/Makefile.in
@@ -37,8 +37,11 @@ host_triplet = @host@
subdir = record
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
- $(top_builddir)/include/kdrive-config.h
+ $(top_builddir)/include/kdrive-config.h \
+ $(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
@@ -75,6 +79,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -95,9 +100,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -126,7 +134,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -135,9 +145,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -176,12 +190,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -201,7 +216,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -211,6 +225,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -224,11 +239,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -264,6 +278,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -288,7 +303,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -311,6 +325,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -342,7 +357,9 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c
index 46218981b..84a96188a 100644
--- a/xorg-server/record/record.c
+++ b/xorg-server/record/record.c
@@ -32,15 +32,13 @@ and Jim Haggerty of Metheus.
*/
-#define NEED_EVENTS
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "dixstruct.h"
#include "extnsionst.h"
-#define _XRECORD_SERVER_
-#include <X11/extensions/recordstr.h>
+#include <X11/extensions/recordproto.h>
#include "set.h"
#include "swaprep.h"
#include "inputstr.h"
@@ -128,11 +126,10 @@ static int numEnabledRCAPs;
* returns an error.
*/
#define VERIFY_CONTEXT(_pContext, _contextid, _client) { \
- (_pContext) = (RecordContextPtr)LookupIDByType((_contextid), RTContext); \
- if (!(_pContext)) { \
- (_client)->errorValue = (_contextid); \
- return RecordErrorBase + XRecordBadContext; \
- } \
+ int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \
+ RTContext, _client, DixUseAccess); \
+ if (rc != Success) \
+ return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \
}
static int RecordDeleteContext(
@@ -374,7 +371,8 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
replylen = pRep->length;
if (recordingClientSwapped) swapl(&replylen, n);
- replylen += numElemHeaders + (datalen >> 2) + (futurelen >> 2);
+ replylen += numElemHeaders + bytes_to_int32(datalen) +
+ bytes_to_int32(futurelen);
if (recordingClientSwapped) swapl(&replylen, n);
pRep->length = replylen;
} /* end if not continued reply */
@@ -482,7 +480,7 @@ RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
(pointer)stuff, SIZEOF(xReq), bytesLeft);
/* reinsert the extended length field that was squished out */
- bigLength = client->req_len + (sizeof(bigLength) >> 2);
+ bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
if (client->swapped)
swapl(&bigLength, n);
RecordAProtocolElement(pContext, client, XRecordFromClient,
@@ -615,7 +613,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
if (pContext->continuedReply)
{
RecordAProtocolElement(pContext, client, XRecordFromServer,
- pri->replyData, pri->dataLenBytes, /* continuation */ -1);
+ (pointer)pri->replyData, pri->dataLenBytes, /* continuation */ -1);
if (!pri->bytesRemaining)
pContext->continuedReply = 0;
}
@@ -625,7 +623,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
if (majorop <= 127)
{ /* core reply */
RecordAProtocolElement(pContext, client, XRecordFromServer,
- pri->replyData, pri->dataLenBytes, pri->bytesRemaining);
+ (pointer)pri->replyData, pri->dataLenBytes, pri->bytesRemaining);
if (pri->bytesRemaining)
pContext->continuedReply = 1;
}
@@ -646,7 +644,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
minorop))
{
RecordAProtocolElement(pContext, client,
- XRecordFromServer, pri->replyData,
+ XRecordFromServer, (pointer)pri->replyData,
pri->dataLenBytes, pri->bytesRemaining);
if (pri->bytesRemaining)
pContext->continuedReply = 1;
@@ -1168,10 +1166,12 @@ RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec)
* Side Effects: none.
*/
static int
-RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
+RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec)
{
int i;
int clientIndex;
+ int rc;
+ pointer value;
for (i = 0; i < nspecs; i++)
{
@@ -1187,8 +1187,10 @@ RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
{
if (clientspecs[i] == clients[clientIndex]->clientAsMask)
continue;
- if (!LookupIDByClass(clientspecs[i], RC_ANY))
- return BadMatch;
+ rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY,
+ client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
}
else
return BadMatch;
@@ -1344,8 +1346,8 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xR
recordingClient = pContext->pRecordingClient ?
pContext->pRecordingClient->clientAsMask : 0;
- err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], stuff->nClients,
- recordingClient);
+ err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
+ stuff->nClients, recordingClient);
if (err != Success) return err;
pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients);
@@ -1960,7 +1962,7 @@ ProcRecordUnregisterClients(ClientPtr client)
4 * stuff->nClients)
return BadLength;
VERIFY_CONTEXT(pContext, stuff->context, client);
- err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1],
+ err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
stuff->nClients, 0);
if (err != Success)
return err;
@@ -2277,8 +2279,8 @@ ProcRecordGetContext(ClientPtr client)
{
rep.nClients += pRCAP->numClients;
rep.length += pRCAP->numClients *
- ( (sizeof(xRecordClientInfo) >> 2) +
- pri->nRanges * (sizeof(xRecordRange) >> 2));
+ ( bytes_to_int32(sizeof(xRecordClientInfo)) +
+ pri->nRanges * bytes_to_int32(sizeof(xRecordRange)));
}
/* write the reply header */
@@ -2577,13 +2579,13 @@ SwapCreateRegister(xRecordRegisterClientsReq *stuff)
swapl(&stuff->nClients, n);
swapl(&stuff->nRanges, n);
pClientID = (XID *)&stuff[1];
- if (stuff->nClients > stuff->length - (sz_xRecordRegisterClientsReq >> 2))
+ if (stuff->nClients > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq))
return BadLength;
for (i = 0; i < stuff->nClients; i++, pClientID++)
{
swapl(pClientID, n);
}
- if (stuff->nRanges > stuff->length - (sz_xRecordRegisterClientsReq >> 2)
+ if (stuff->nRanges > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq)
- stuff->nClients)
return BadLength;
RecordSwapRanges((xRecordRange *)pClientID, stuff->nRanges);
@@ -2738,8 +2740,8 @@ RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec *pci)
char *pConnSetup = (char *)xalloc(prefixsize + restsize);
if (!pConnSetup)
return;
- SwapConnSetupPrefix(pci->prefix, pConnSetup);
- SwapConnSetupInfo(pci->setup, pConnSetup + prefixsize);
+ SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix*)pConnSetup);
+ SwapConnSetupInfo((char*)pci->setup, (char*)(pConnSetup + prefixsize));
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
(pointer)pConnSetup, prefixsize + restsize, 0);
xfree(pConnSetup);
@@ -2862,6 +2864,13 @@ RecordCloseDown(ExtensionEntry *extEntry)
void
RecordExtensionInit(void)
{
+ /* FIXME Record is currently broken. Dont initialize it so that clients
+ * that require it can bail out correctly rather than waiting for stuff
+ * that'll never happen */
+ ErrorF("record: RECORD extension enabled at configure time.\n");
+ ErrorF("record: This extension is known to be broken, disabling extension now..\n");
+ ErrorF("record: http://bugs.freedesktop.org/show_bug.cgi?id=20500\n");
+#if 0
ExtensionEntry *extentry;
RTContext = CreateNewResourceType(RecordDeleteContext);
@@ -2884,5 +2893,6 @@ RecordExtensionInit(void)
}
RecordErrorBase = extentry->errorBase;
+#endif
} /* RecordExtensionInit */