| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c
Author: Robert Morell <rmorell@nvidia.com>
Date: Thu May 9 13:09:02 2013 -0700
os: Reset input buffer's 'ignoreBytes' field
If a client sends a request larger than maxBigRequestSize, the server is
supposed to ignore it.
Before commit cf88363d, the server would simply disconnect the client. After
that commit, it attempts to gracefully ignore the request by remembering how
long the client specified the request to be, and ignoring that many bytes.
However, if a client sends a BigReq header with a large size and disconnects
before actually sending the rest of the specified request, the server will
reuse the ConnectionInput buffer without resetting the ignoreBytes field. This
makes the server ignore new X clients' requests.
This fixes that behavior by resetting the ignoreBytes field when putting the
ConnectionInput buffer back on the FreeInputs list.
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit c80c41767eb101e9dbd8393d8cca7764b4e248a4
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Mon Oct 25 22:01:32 2010 -0700
os: Fix BigReq ignoring when another request is pending
Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of
BigReq requests that are way too large and handles the case where the
read() syscall returns a short read. However, it neglected to handle
the case where it returns a long read, which happens when the client
has another request in the queue after the bogus large one.
Handle the long read case by subtracting the smaller of 'needed' and
'gotnow' from oci->ignoreBytes. If needed < gotnow, simply subtract
the two, leaving gotnow equal to the number of extra bytes read.
Since the code immediately following the (oci->ignoreBytes > 0) block
tries to handle the next request, advance oci->bufptr immediately
instead of setting oci->lenLastReq and letting the next call to
ReadRequestFromClient do it.
Fixes the XTS pChangeKeyboardMapping-3 test.
CASES TESTS PASS UNSUP UNTST NOTIU WARN FIP FAIL UNRES UNIN ABORT
-Xproto 122 389 367 2 19 0 0 0 1 0 0 0
+Xproto 122 389 368 2 19 0 0 0 0 0 0 0
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
commit cf88363db0ebb42df7cc286b85d30d7898aea840
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Fri Aug 27 10:20:29 2010 -0700
os: Return BadLength instead of disconnecting BigReq clients (#4565)
If a client sends a big request that's too big (i.e. bigger than
maxBigRequestSize << 2 bytes), the server just disconnects it. This makes the
client receive SIGPIPE the next time it tries to send something.
The X Test Suite sends requests that are too big when the test specifies the
TOO_LONG test type. When the client receives SIGPIPE, XTS marks it as
UNRESOLVED, which counts as a failure.
Instead, remember how long the request is supposed to be and then return that
size. Dispatch() checks the length and sends BadLength to the client. Then,
whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to
process it as a request.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 4b0d0df34f10a88c10cb23dd50087b59f5c4fece
Author: Peter Harris <pharris@opentext.com>
Date: Mon Nov 17 14:31:24 2014 -0500
Fix overflow of ConnectionOutput->size and ->count
When (long) is larger than (int), and when realloc succeeds with sizes
larger than INT_MAX, ConnectionOutput->size and ConnectionOutput->count
overflow and become negative.
When ConnectionOutput->count is negative, InsertIOV does not actually
insert an IOV, and FlushClient goes into an infinite loop of writev(fd,
iov, 0) [an empty list].
Avoid this situation by killing the client when it has more than INT_MAX
unread bytes of data.
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported X.org commits:
commit b380f3ac51f40ffefcde7d3db5c4c149f274246d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Tue Aug 2 17:53:01 2016 +0900
dix: Pass ClientPtr to FlushCallback
This change has two effects:
1. Only calls FlushCallbacks when we're actually flushing data to a
client. The unnecessary FlushCallback calls could cause significant
performance degradation with compositing, which is significantly
reduced even without any driver changes.
2. By passing the ClientPtr to FlushCallbacks, drivers can completely
eliminate unnecessary flushing of GPU commands by keeping track of
whether we're flushing any XDamageNotify events to the client for
which the corresponding rendering commands haven't been flushed to
the GPU yet.
Reviewed-by: Adam Jackson <ajax@redha.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
commit c65f610e12f9df168d5639534ed3c2bd40afffc8
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Thu Jul 29 18:52:35 2010 -0400
Always call the flush callback chain when we flush client buffers
We were missing the callback in a couple of places. Drivers may use
the flush callback to submit batched up rendering before events (for
example, damage events) are sent out, to ensure that the rendering
has been queued when the client receives the event.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found in X.org commit:
commit d5bf6f95f31037bd49b11348b500c3c13b7e0c99
Author: Keith Packard <keithp@keithp.com>
Date: Thu Oct 4 14:42:37 2012 -0700
Fix FlushClient to write extraBuf when provided (regression fix)
In commit:
commit 092c57ab173c8b71056f6feb3b9d04d063a46579
Author: Adam Jackson <ajax@redhat.com>
Date: Fri Jun 17 14:03:01 2011 -0400
os: Hide the Connection{In,Out}put implementation details
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
the check for an empty output buffer was moved from one calling
location into the FlushClient implementation itself. However, this
neglected the possibility that additional data, in the form of
'extraBuf' would be passed to FlushClient from other code paths. If the
output buffer happened to be empty at that time, the extra data would
never be written to the client.
This is fixed by checking the total data to be written, which includes
both pending and extra data, instead of just the pending data.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit 9bf46610a9d20962854016032de4567974e87957
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Jun 21 22:58:31 2013 +0100
os: Immediately queue initial WriteToClient
If we immediately put the WriteToClient() buffer into the socket's write
queue, not only do we benefit from sending the response back to client
earlier, but we also avoid the overhead of copying the data into our own
staging buffer and causing extra work in the next select(). The write is
effectively free as typically we may only send one reply per client per
select() call, so the cost of the FlushClient() is the same.
shmget10: 26400 -> 110000
getimage10: 25000 -> 108000
shmget500: 3160 -> 13500
getimage500: 1000 -> 1010
The knock-on effect is that on a mostly idle composited desktop, the CPU
overhead is dominated by the memmove in WriteToClient, which is in turn
eliminated by this patch.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completing the below X.org commit:
commit a3a40291330bad10401fe2bcdbc097ce742b026a
Author: Keith Packard <keithp@keithp.com>
Date: Mon Sep 21 07:16:16 2015 +0100
os/xdmcp: Remove dead 'restart' code
The X server used to wait for the user to hit a key or move the mouse
before restarting the session after a keepalive failure. This,
presumably, was to avoid having the X server continuously spew XDMCP
protocol on the network while the XDM server was dead.
Switching into this state was removed from the server some time before
XFree86 4.3.99.16, so the remaining bits of code have been dead for
over a decade, and no-one ever noticed.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit ce6546337487c052b5dd3c04d3d8d4b09d691c3d
Author: Keith Packard <keithp@keithp.com>
Date: Tue May 31 09:38:17 2016 -0700
os: Initialize NotifyFds earlier in startup
If the server calls AbortServer during the first-time initialization
(which can happen if you start the server on an already using
DISPLAY), then the dbus code will shut down and call the notify fd
interface. If the notify fd list hasn't been initialized, the server
will crash.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AddEnabledDevices/RemoveEnabledDevices
Backported from X.org:
commit be5a513fee6cbf29ef7570e57eb0436d70fbd88c
Author: Keith Packard <keithp@keithp.com>
Date: Mon Dec 7 15:12:14 2015 -0800
Remove AddEnabledDevice and AddGeneralSocket APIs
All uses of these interfaces should instead be using the NotifyFd API
instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
commit 4020aacd1fc5b9c63369f011aeb9120af9c55218
Author: Keith Packard <keithp@keithp.com>
Date: Wed Nov 11 22:02:03 2015 -0800
os: Implement support for NotifyFd X_NOTIFY_WRITE
This adds the ability to be notified when a file descriptor is
available for writing.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WaitForSomething to mieqProcessInputEvents.
Backported from X.org:
commit 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd
Author: Fredrik Höglund <fredrik@kde.org>
Date: Wed Jan 3 21:05:35 2007 +0100
Move the code for resetting the DPMS mode in response to input events,
from WaitForSomething to mieqProcessInputEvents.
mieqProcessInputEvents already handles resetting the screen saver.
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit 0c41b7af4ab0c8d22b88f201293f59524d1e7317
Author: Keith Packard <keithp@keithp.com>
Date: Wed Nov 11 22:02:02 2015 -0800
os: Add NotifyFd interfaces
This provides a callback-based interface to monitor file
descriptors beyond the usual client and device interfaces.
Modules within the server using file descriptors for reading and/or
writing can call
Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data);
mask can be any combination of X_NOTIFY_READ and X_NOTIFY_WRITE.
When 'fd' becomes readable or writable, the notify_fd function will be
called with the 'fd', the ready conditions and 'data' values as arguments,
When the module no longer needs to monitor the fd, it will call
void RemoveNotifyFd(int fd);
RemoveNotifyFd may be called from the notify function.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit db1089eafc1c5371fa0030202de588d2e2b4f8e5
Author: Keith Packard <keithp@keithp.com>
Date: Mon Sep 21 07:16:17 2015 +0100
os/xdmcp: Just send XDMCP keepalive packets once every three minutes
There was a complicated scheme to increase the time between keepalives
from 3 minutes up to as much as 24 hours in an attempt to reduce
network traffic from idle X terminals. X terminals receiving X
traffic, or receiving user input would use the 3 minute value; X
terminals without any network traffic would use a longer value.
However, this was actually broken -- any activity in the X server,
either client requests or user input, would end up resetting the
keepalive timeout, so a user mashing on the keyboard would never
discover that the XDMCP master had disappeared and have the session
terminated, which was precisely the design goal of the XDMCP keepalive
mechanism.
Instead of attempting to fix this, accept the cost of a pair of XDMCP
packets once every three minutes and just perform keepalives
regularly.
This will also make reworking the block and wakeup handler APIs to
eliminate select masks easier.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
| |
There might be some library linking missing on platforms that deliver
timingsafe_memcmp but I cannot test that here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#365
These two commits:
commit 5c44169caed811e59a65ba346de1cadb46d266ec
Author: Adam Jackson <ajax@redhat.com>
Date: Thu Mar 2 17:20:30 2017 -0500
os: Squash missing declaration warning for timingsafe_memcmp
timingsafe_memcmp.c:21:1: warning: no previous prototype for ‘timingsafe_memcmp’ [-Wmissing-prototypes]
timingsafe_memcmp(const void *b1, const void *b2, size_t len)
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit d7ac755f0b618eb1259d93c8a16ec6e39a18627c
Author: Matthieu Herrb <matthieu@herrb.eu>
Date: Tue Feb 28 19:18:25 2017 +0100
Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624
Provide the function definition for systems that don't have it.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
|
|
| |
,os/{Imakefile,reallocarray.c}}: backport reallocarray() implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Content of that file is now hard-coded.
Adopting an exact copy of os/oscolor.c from X.org leads to this compiler warning:
```
oscolor.c:844:1: warning: string length ‘7614’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Woverlength-strings]
};
^
```
This will be address later in coordination with X.org.
Note: there is a tiny change in oscolor.c as we ship it. The original X.org file includes <X11/keysym.h> which seems
unneeded. We drop that one line from oscolor.c.
Fixes ArcticaProject/nx-libs#259.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backported from X.org:
commit 9f9268821b13038556fbc029df54ab0e9b2aa77f
Author: Mathieu Bérard <mathieu.berard@crans.org>
Date: Mon Aug 11 13:52:38 2008 -0400
The smart scheduler is not optional.
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
| |
Relates to ArcticaProject/nx-libs#275.
|
|
|
|
| |
Relates to ArcticaProject/nx-libs#275.
|
|
|
|
| |
Relates to ArcticaProject/nx-libs#275.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#274.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#273.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#272.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#271.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used in nxagent.
From c3d14036729fd186d4ec7ca1de603e1f2d174e2f Mon Sep 17 00:00:00 2001
From: Eric Anholt <anholt@freebsd.org>
Date: Fri, 10 Feb 2006 22:00:30 +0000
Subject: Remove libcwrapper usage from xorg server modules. The libcwrapper is
only of (marginal) use in the drivers, and that usage remains.
Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Fixes ArcticaProject/nx-libs#246 (together with merge commit
ecd335fa61551d0b86d3f075469a7743ab899d95).
|
|
|
|
|
|
| |
warning: "XTRANS_SEND_FDS" is not defined [-Wundef]
This define came in via the recent xtrans update.
|
| |
|
| |
|
|
|
|
| |
just as Xorg upstream did
|
|
|
|
|
|
| |
We do not build loadable modules, so we do not need them anywhere.
Also remove the extra files requires for module builds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was reported on irc on Fedora when rawhide went to 1.17.1.
regression occured in: 2566835b4374edb3e5a8353d4f7c9e7ec4851c57
os: Eliminate uninitialized value warnings from access.c
siAddrMatch doesn't need addr to be a useful value, it checks
some things like localuser without having an address at all.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ConvertAddr function doesn't reliably set the 'addr' return value,
and so callers are getting flagged for using potentially uninitialized
values. Initialize the value in the callers to NULL and then go ahead
and check for NULL values before using them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetHosts saves the pointer to allocated memory in *data, and then
wants to bounds-check writes to that region, but was mistakenly using
a bare 'data' instead of '*data'. Also, data is declared as void **,
so we need a cast to turn it into a byte pointer so we can actually do
pointer comparisons.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
v1: Keith Packard
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
|
|
|
|
|
| |
v1: Eamon Walsh
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
|
|
|
|
| |
Just like upstream does
|
|
|
|
| |
just like upstream does
|
|
|
|
| |
xserver upstream has included the required files. So do we.
|
|
|
|
|
| |
This has already been started while replacing copyright info in file
headers and has now been completed with this commit.
|
|
|
|
| |
that NoMachine placed there own copyright statement in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove defines of NEED_EVENTS and NEED_REPLIES because they are never
used anywhere.
Basically these three commits, but as they are newer and to not match
the code structure the patches have not been applied but replaced by
sed + manual intervention:
From cb95642dc8edebb2935dd471f8b339cb98aa8481 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@redhat.com>
Date: Fri, 28 Nov 2008 22:28:32 +1000
Subject: Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.
Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.
Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
--
From 6de368c9aa7ccd2fcd62fca5a2b278913db4d03d Mon Sep 17 00:00:00 2001
From: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu, 1 Jul 2010 06:50:47 -0300
Subject: Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
--
From 57c03e52e6b4e3ed54df5fdd778865467d08e119 Mon Sep 17 00:00:00 2001
From: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu, 1 Jul 2010 06:59:48 -0300
Subject: Purge macro NEED_EVENTS
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Casting return to (void) was used to tell lint that you intended
to ignore the return value, so it didn't warn you about it.
Casting the third argument to (char *) was used as the most generic
pointer type in the days before compilers supported C89 (void *)
(except for a couple places it's used for byte-sized pointer math).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
| |
Enough with the casting. Doesn't break API or even ABI, but does make
a lot of silly casts superfluos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.
For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
|
|
|
|
|
|
| |
Use if statement rather than switch.
Backported from X.org. Found in commit...
commit 7deaaa797cf8e7ca71e9b34fa6f413d1ed2b3dab
Author: Adam Jackson <ajax@nwnk.net>
Date: Tue Mar 28 01:21:00 2006 +0000
|
|
|
|
| |
done in X.org.
|
|
|
|
| |
This undoes the workaround for X.org bug #964, which was an Xprintism.
|
|
|
|
|
|
|
|
|
| |
There's no sense verifying that we can create the lock file and then
ignoring the return value from write.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
| |
ClientAuthorized().
|
|
|
|
| |
if not yet defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(introducing wrong_size check at build time).
While working on this changeset, various spots got discovered where
swapl or swaps was used on a wrong type, where byte swapping calls had
been forgotten or done on the wrong variable.
This backport at least includes changes from the following X.org
commits, listed in non-chronological order:
commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8
Author: Matt Turner <mattst88@gmail.com>
Date: Thu Aug 4 15:35:41 2011 -0400
Use internal temp variable for swap macros
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01
Author: Matt Turner <mattst88@gmail.com>
Date: Wed Sep 21 17:14:16 2011 -0400
Use correct swap{l,s} (or none at all for CARD8)
Swapping the wrong size was never caught because swap{l,s} are macros.
It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.
v2: dmx.c fixes from Keith.
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit dab064fa5e0b1f5c67222562ad5367005832cba1
Author: Andrea Canciani <ranma42@gmail.com>
Date: Tue Nov 2 20:10:32 2010 +0100
render: Fix byteswapping of gradient stops
The function swapStops repeatedly swaps the color components as
CARD16, but incorrectly steps over them as if they were CARD32.
This causes half of the stops not to be swapped at all and some
unrelated data be swapped instead.
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
commit 54770c980cd2b91a8377f975a58ed69def5cfa42
Author: Matt Turner <mattst88@gmail.com>
Date: Tue Aug 16 16:59:07 2011 -0400
Cast char* buffers to swap functions
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 6844bd2e63490870bab3c469eec6030354ef2865
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jan 9 19:52:00 2008 -0800
More Xv extension byte swapping fixes
commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83
Author: Michel Dänzer <michel@tungstengraphics.com>
Date: Wed Jan 16 14:24:22 2008 +0100
Yet another Xv extension byte swapping fix.
|