aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.c30
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.c30
-rw-r--r--xorg-server/hw/xfree86/dixmods/Makefile.am2
3 files changed, 35 insertions, 27 deletions
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c
index abfb880a3..679a302ea 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.c
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c
@@ -349,25 +349,29 @@ __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
* get the reply from the back-end server
*/
_XReply(dpy, (xReply *) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *) malloc(be_buf_size);
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
+ if (s == from_screen) {
+ /* Save data from last reply to send on to client */
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatDataWords(dpy, be_reply.length);
+ return BadAlloc;
+ }
}
- else {
- /* Throw data on the floor */
+ }
+ else {
+ /* Just discard data from all replies before the last one */
+ if (be_reply.length > 0)
_XEatDataWords(dpy, be_reply.length);
- return BadAlloc;
- }
}
UnlockDisplay(dpy);
SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
}
/*
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c
index 50d505c4b..b475daf0f 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c
@@ -332,25 +332,29 @@ __glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
* get the reply from the back-end server
*/
_XReply(dpy, (xReply *) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *) malloc(be_buf_size);
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
+ if (s == from_screen) {
+ /* Save data from last reply to send on to client */
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatDataWords(dpy, be_reply.length);
+ return BadAlloc;
+ }
}
- else {
- /* Throw data on the floor */
+ }
+ else {
+ /* Just discard data from all replies before the last one */
+ if (be_reply.length > 0)
_XEatDataWords(dpy, be_reply.length);
- return BadAlloc;
- }
}
UnlockDisplay(dpy);
SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
}
/*
diff --git a/xorg-server/hw/xfree86/dixmods/Makefile.am b/xorg-server/hw/xfree86/dixmods/Makefile.am
index 9933bc88d..3c43640ec 100644
--- a/xorg-server/hw/xfree86/dixmods/Makefile.am
+++ b/xorg-server/hw/xfree86/dixmods/Makefile.am
@@ -32,7 +32,7 @@ libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
if AIGLX_DRI_LOADER
libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
if NO_UNDEFINED
-libglx_la_LIBADD += ../dri/libdri.la ../dri2/libdri2.la
+libglx_la_LIBADD += $(LIBDRM_LIBS) $(PIXMAN_LIBS)
endif
endif
libglx_la_SOURCES = glxmodule.c