[X2Go-Commits] [nx-libs] 37/38: dbe: add NXAGENT_SERVER guard for DixLookup
git-admin at x2go.org
git-admin at x2go.org
Mon Feb 26 06:45:10 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit f1f2a360fc2e2b57c7e090ef5536438d66c2e334
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Mon Jan 22 22:44:54 2018 +0100
dbe: add NXAGENT_SERVER guard for DixLookup
---
nx-X11/programs/Xserver/dbe/Imakefile | 8 ++++++++
nx-X11/programs/Xserver/dbe/dbe.c | 24 ++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/nx-X11/programs/Xserver/dbe/Imakefile b/nx-X11/programs/Xserver/dbe/Imakefile
index 54ce471..3c4f401 100644
--- a/nx-X11/programs/Xserver/dbe/Imakefile
+++ b/nx-X11/programs/Xserver/dbe/Imakefile
@@ -6,6 +6,14 @@
INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) `pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
+#if defined(NXAgentServer) && NXAgentServer
+ NX_DEFINES = -DNXAGENT_SERVER
+#endif
+
+ DEFINES = \
+ $(NX_DEFINES) \
+ $(NULL)
+
NormalLibraryObjectRule()
NormalLibraryTarget(dbe,$(OBJS))
diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c
index 702af85..588dd05 100644
--- a/nx-X11/programs/Xserver/dbe/dbe.c
+++ b/nx-X11/programs/Xserver/dbe/dbe.c
@@ -375,11 +375,17 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq);
/* The window must be valid. */
+#ifndef NXAGENT_SERVER
+ status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
+ if (status != Success)
+ return status;
+#else
if (!(pWin = SecurityLookupWindow(stuff->window, client,
DixWriteAccess)))
{
return(BadWindow);
}
+#endif
/* The window must be InputOutput. */
if (pWin->drawable.class != InputOutput)
@@ -704,12 +710,21 @@ ProcDbeSwapBuffers(ClientPtr client)
/* Check all windows to swap. */
/* Each window must be a valid window - BadWindow. */
+#ifndef NXAGENT_SERVER
+ error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client,
+ DixWriteAccess);
+ if (error != Success) {
+ free(swapInfo);
+ return error;
+ }
+#else
if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client,
DixWriteAccess)))
{
free(swapInfo);
return(BadWindow);
}
+#endif
/* Each window must be double-buffered - BadMatch. */
if (DBE_WINDOW_PRIV(pWin) == NULL)
@@ -867,12 +882,21 @@ ProcDbeGetVisualInfo(ClientPtr client)
for (i = 0; i < stuff->n; i++)
{
+#ifndef NXAGENT_SERVER
+ register int rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0,
+ DixReadAccess);
+ if (rc != Success) {
+ free(pDrawables);
+ return rc;
+ }
+#else
if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable(
drawables[i], client, DixReadAccess)))
{
free(pDrawables);
return(BadDrawable);
}
+#endif
}
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list