| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
It was unused and added complexity and bugs to the code. So let's
remove it rather than trying to clean up a function no one needed.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Result of overflow on signed integer arithmetic is undefined in C/C++ standard.
So in previous version clang was compiling the statement as (int)a > (int)b (i.e. assuming no overflow), which leads to incorrect result.
Correct deterministic behavior means doing overflow arithmetic as unsigned, i.e.
a != b && a - b <= UINT_MAX / 2
|
| |
| |
| |
| |
| | |
We will log the exception, so avoid direct writes to stderr by
simply removing these log lines.
|
| | |
|
|/ |
|
|
|
|
|
|
| |
There is some bug in gcc's new -Werror=format-overflow that makes it
think majorVersion could end up being very large. Increase the target
buffer for now to keep gcc happy.
|
| |
|
|
|
|
|
|
|
| |
This provides some basic rate limiting that will make it difficult
for an attacker to brute force passwords. Only relevant when the
blacklist is disabled as otherwise the attacker only gets a very
limited number of attempts.
|
|
|
|
|
| |
It is not enough to create an exception object, you need to throw
it as well.
|
|
|
|
|
|
| |
There might be multiple clients using a single IP (e.g. NAT), which
can make the blacklist do more harm than good. So add a setting to
disable it if needed.
|
|
|
|
|
| |
No need to expose these, so keep them internal to the implementation,
like most settings are.
|
|\ |
|
| | |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| | |
Add more checks and fix some callers to make sure that the server
core always has a valid screen layout configured.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Make the API consisitent by requiring the caller to check what the client
supports before calling any of the write* functions. This avoids the
confusion that the functions might not always do anything.
|
| |
| |
| |
| |
| |
| | |
Avoid having the callers need to know about the different variants
of these functions and instead have the writer pick the most appropriate
extension.
|
| |
| |
| |
| |
| |
| | |
This is what the protocol requires, rather than sending what the
client specified in the request. This should be the same in practice
except for failures and possibly some races.
|
| |
| |
| |
| |
| |
| | |
ServerParams should contain the server state and not information about
client settings or capabilities. Move those things up a level to the
CConnection object.
|
| |
| |
| |
| |
| |
| | |
No need to have one setting for each extension. All the client code
needs to indicate is if it supports resize. The common code can then
map this to relevant extensions.
|
| |
| |
| |
| | |
It needs to be validated and take effect in the server first.
|
| |
| |
| |
| | |
These were either completely unused, or always true.
|
| |
| |
| |
| |
| | |
Tight is the default preferred encoding, so we don't really need
special handling for it to be first in the list.
|
| |
| |
| |
| |
| | |
This is a lot safer and cleaner. The old code had a fixed size that
we didn't properly keep track of.
|
| |
| |
| |
| |
| |
| | |
Make sure all methods only write what is given as arguments, and
avoid side effects by getting data from parameter objects. This keeps
things readable in the calling code.
|
| |
| |
| |
| |
| | |
It's a generic client thing, so abstract it in to the common library.
Makes it easier to integrate with other common code.
|
| |
| |
| |
| |
| |
| |
| | |
Avoid using the callbacks used for runtime changes for the initial
setup. They weren't really useful anyway as you could not allocate
a framebuffer without also knowing the pixel format. So make things
more clear by letting serverInit() get the initial settings.
|
| |
| |
| |
| |
| | |
Add an explicit callback for subclasses to do their startup in. This
makes it easier to do proper ordering, and avoids mistakes.
|
| | |
|
| |
| |
| |
| |
| | |
Better to check the actual list of supported encodings directly.
Makes parts more readable, and no risk of getting out of sync.
|
| |
| |
| |
| |
| | |
No need to spread things out. Keep all of the handling in a single
place to make things clearer.
|
| |
| |
| |
| |
| |
| | |
Now that we've split out server state to ServerParams, ConnParams
only contains state for a client. Rename the class and variables
to reflect this.
|
| |
| |
| |
| |
| |
| | |
We need to track different things in the server and client, so
separate things to two independent structures to keep things more
clear.
|
| |
| |
| |
| |
| |
| |
| | |
Avoid direct access to the screen dimensions and layout so that we
can make sure it stays sane. This also makes sure the layout is
properly updated when we only get the screen dimensions from the
server.
|
| |
| |
| |
| |
| | |
That object is just a container for the current state. Move the I/O
to the classes already doing such stuff.
|
| |
| |
| |
| |
| | |
We should not be including server headers from client code. It was
not even needed, so simply remove it.
|
| |
| |
| |
| |
| |
| | |
32 bits are not enough to keep track of all the pixels that might
flow through the system. Expand things to 64 bits, which should cover
all reasonable uses.
|
| |
| |
| |
| |
| |
| |
| | |
We need to check earlier if we are going to send this refresh or
not. Otherwise we send out pings pointlessly, and we also stall
the request loop with a client as we clear the requested region
without actually sending an update message.
|
| |
| |
| |
| |
| | |
It makes the logic a bit easier to follow, and also fixes the
case where just a fake update is needed.
|
| |
| |
| |
| | |
Fallout from beb59a43.
|
| |
| |
| |
| |
| | |
We need a larger range to handle the temporary overflow caused by
the Floyd-Steinberg dithering.
|
|\ \ |
|
| |/
| |
| |
| |
| | |
These are not allowed in C++, and have been made optional in C11.
So let's just get rid of them and any issues they may cause.
|
|\ \ |
|
| | | |
|
| | | |
|
|\ \ \ |
|