Pierre Ossman [Tue, 10 Sep 2024 14:57:24 +0000 (16:57 +0200)]
Consistently use SocketException for socket errors
The behaviour is not consistent as Windows doesn't use errno for socket
errors, but Unix systems do. Always use the same exception to keep
things somewhat sane.
Pierre Ossman [Tue, 10 Sep 2024 15:05:39 +0000 (17:05 +0200)]
Move SocketException to rdr
Socket APIs are used in more places than the abstraction in
common/network. Make it easier to use this exception class by putting
it in a more common place.
Pierre Ossman [Mon, 2 Sep 2024 18:41:47 +0000 (20:41 +0200)]
Remove ConnFailedException
There were more unclear usage of this exception class, and since nothing
catches it it is very unclear what the purpose is. Go ahead and just
remove it.
Pierre Ossman [Fri, 30 Aug 2024 14:09:38 +0000 (16:09 +0200)]
Only read first password from file
Read just the first password and ignore anything else in the password
file. This allows you to reuse a password file from the server that also
includes a view-only password.
Andri Yngvason [Thu, 22 Aug 2024 21:26:59 +0000 (21:26 +0000)]
H264Libav: Use nearest-neighbour sampling in scaler
sws_getCachedContext will set a default sampling method if 0 is passed
to the flags argument. This means that when it is called again, the
flags argument will not match the flags in the context, so a new one
will be allocated every time.
To get around this problem, we assign an explicit sampling method, one
that also happens to be more efficient and just as good for this
use-case as the default one, which is bicubic interpolation.
Pierre Ossman [Tue, 13 Aug 2024 13:53:07 +0000 (15:53 +0200)]
Use proper gnutls_free() on Windows
The underlying issue requiring this hack was fixed ages ago.
Unfortunately, the fixed GnuTLS doesn't consider static linking. So we
need to add a new hack that permits that.
Pierre Ossman [Tue, 3 Jan 2023 10:02:36 +0000 (11:02 +0100)]
Don't adjust manually sized window
It's unclear why this code was ever added, and it can be very confusing
that the window partially adjusts itself. The code is also in conflict
with the earlier comment that states we'll leave the window size alone
if it didn't perfectly match before the resize.
Pierre Ossman [Thu, 28 Dec 2023 08:33:07 +0000 (09:33 +0100)]
Remove fake framebuffer update request call
This method should only be called when the client actually sends a
framebuffer update request, otherwise we might send data the client is
not ready for.
It's unclear what the purpose of this call is, so we have no better fix
than to just remove it.
Pierre Ossman [Wed, 7 Aug 2024 08:08:43 +0000 (10:08 +0200)]
Remove auth exception prefix
This prefix often just added noise, and could sometimes be added
multiple times. It's better that user interface catch the specific
exception type and give a more descriptive presentation to the user.
Pierre Ossman [Tue, 6 Aug 2024 12:53:30 +0000 (14:53 +0200)]
Avoid XKeysymToString() conflict with libX11
We implement our own version of this, and because of this we carry our
lookup table generated by the same tool that libX11 uses. Unfortunately,
that table is a global symbol and as such there might be a mismatch of
which table should be used.
Make sure we get our own copy by changing the name of it. We use a
define rather than modifying ks_tables.h as that file is automatically
generated.
Carlos Santos [Thu, 25 Jul 2024 21:39:59 +0000 (18:39 -0300)]
vncsession: use /bin/sh if the user shell is not set
An empty shell field in the password file is valid, although not common.
Use /bin/sh in this case, as documented in the passwd(5) man page, since
the vncserver script requires a non-empty SHELL environment variable.
Fixes issue #1786.
Signed-off-by: Carlos Santos <casantos@redhat.com>
Pierre Ossman [Fri, 5 Jul 2024 12:05:45 +0000 (14:05 +0200)]
Be more careful with ComparingUpdateTracker pointer
As of 28c3f12, we might now be running the frame clock even without a
framebuffer present. This means we need to be more careful accessing the
ComparingUpdateTracker, as it might be NULL.
Pierre Ossman [Fri, 19 Apr 2024 21:48:37 +0000 (23:48 +0200)]
Remove careful client iteratation
Clients cannot remove themselves from the list as we are iterating, so
we don't need this complexity. If a client encounters a problem, it will
only mark it self as closed and will be removed from the list at a later
time.
Pierre Ossman [Wed, 3 Apr 2024 10:38:04 +0000 (12:38 +0200)]
Disable gcc NULL warning for context menu
We use the pointer to just store an identifier for the menu, but this is
enough for gcc to think we are using 0 instead of nullptr and complain.
Even an explicit cast isn't enough to silence it here for some reason.
Pierre Ossman [Tue, 2 Apr 2024 14:06:10 +0000 (16:06 +0200)]
Make sure we use C++ 11
It's rare we use a compiler that has anything older as a default, but it
does happen sometimes. So make sure to guarantee this so we can start
using more modern constructs.