Pierre Ossman
9a153b0a7a
Add keyboard debug log to servers
Makes it easier to troubleshoot keyboard issues by printing exactly
what key events the server is getting from the client.
8 years ago
Pierre Ossman
b7e5574a3a
Log which addresses connection attempts are made against
9 years ago
Pierre Ossman
5a126667a3
Properly report connect error codes
The logic was flawed and would treat all connect errors as
if there were no addresses found.
9 years ago
Pierre Ossman
3c56d4f3c7
Fix infinite update caused by b64dbf2
The bug fix in b64dbf2
didn't account for the proper request
region in the case of continuous updates. Make sure we use the
proper variable for which region we've sent updates for.
9 years ago
Pierre Ossman
a9af1f1246
Fix some bad signed/unsigned mismatches
9 years ago
Pierre Ossman
b64dbf29ae
Avoid losing updates on partial requests
A request may be for only part of the frame buffer, meaning we cannot
discard all changes just because we've send out an update. There might
still be modified areas remaining that haven't been requested yet.
9 years ago
Pierre Ossman
671d2effa0
Clean up server rendered cursor logic
Variables were reused a bit too heavily and it was possible to get
the logic at a point where the server would try to render a cursor
where it wasn't needed, and the empty update rect would cause a
crash. Clear things up by introducing some more explicit variables.
9 years ago
Pierre Ossman
56f99d63df
Change fillRect() to take a buffer instead of a pixel
There has been some confusion if fillRect() should accept a buffer
or a pixel. This can cause misrendering if your data is not in the
native endian order. A buffer makes more sense here though, and
is what most of the callers are already assuming, so change the
API to follow that.
9 years ago
Pierre Ossman
500cb6ef11
Fix Winsock errno code overlap
Some Winsock errno:s conflict with the standard ones. Try to
restrict the redefines to things relevant for sockets.
9 years ago
Pierre Ossman
333aa2f3fd
Only include syslog logger on Unix systems
9 years ago
Pierre Ossman
135906e4b2
Remove parameter "hasBeenSet" logic
It doesn't really make sense anymore given that settings might come
from the GUI or configuration and not only the command line.
9 years ago
Michal Srb
9d93fb4c54
Remove hardcoded "Xvnc" in syslog logger.
9 years ago
Pierre Ossman
056c153209
Clarify Windows SO_REUSEADDR exception
9 years ago
Pierre Ossman
b6536e250a
Repair SO_REUSEADDR
SO_REUSEADDR needs to be set before we call bind() for it to have
any effect. It got shuffled around in e4d9726
.
9 years ago
Michal Srb
33374a944f
Add syslog logger.
9 years ago
Michal Srb
2defd78d05
Expose log levels from LogWriter.
9 years ago
Pierre Ossman
cfb21169c4
Require getaddrinfo() on all systems
Every reasonably current system support getaddrinfo() so get rid
of the legacy fallbacks.
9 years ago
Pierre Ossman
f7d15000ff
Do not look at errno for getaddrinfo() errors
9 years ago
Pierre Ossman
3ab5db4384
Replacement for dup() on Windows
It doesn't work on sockets, which require a bit more care.
9 years ago
Pierre Ossman
a6f97409e8
Fix proper socket headers for Win32
9 years ago
Pierre Ossman
57cab51d83
Resurrect TcpListener::getMyAddresses()
It is needed by WinVNC, but got removed in 892d10a70
. Also fix
a couple of issues:
- Use getnameinfo() in order to be compatible with Windows XP
- Make it static since it doesn't use a specific socket
- Respect UseIPv4 and UseIPv6
- Flags for getaddrinfo() that match binding code
- Dummy service value for Windows compatibility
9 years ago
Pierre Ossman
9d78440b83
Make sure Win32 sockets are available in new listening API
9 years ago
Pierre Ossman
a6570c5da3
AI_NUMERICSERV is not available on some systems
9 years ago
Pierre Ossman
2f744170d4
Make sure socket errno defines are available for Win32
9 years ago
Pierre Ossman
fdc55e54cc
family variable can be unset when matching any address
9 years ago
Tim Waugh
c24a64d90d
IPv6 support for TcpFilter.
9 years ago
Tim Waugh
892d10a705
Fixed IPv6 support.
The TcpListener constructor now takes a 'struct sockaddr*' instead of
a string, and the createTcpListeners function creates TcpListener
instances for an address based on the results from getaddrinfo().
The XserverDesktop class now takes a list of TcpListener instances for
each of the RFB and HTTP sockets.
The TcpListener::closeFd member variable is not used and has been
removed.
9 years ago
Tim Waugh
a85363daa8
Whitespace changes only.
9 years ago
Pierre Ossman
ba6fbfe368
Give CharArray a printf style method to ease automatic allocation
9 years ago
Pierre Ossman
9450b9c142
The PAM callback is slightly different on Solaris
9 years ago
Pierre Ossman
7728be27d0
Add extra parentheses to avoid and/or priority ambiguity
9 years ago
Pierre Ossman
b1cd6ca8f0
Reorder class initialiser list to match what actually happens
9 years ago
Pierre Ossman
615a0f58f1
Make Rect::area() signed, just like Rect::width()/height()
Makes it more sane what type to use when interacting with this class.
9 years ago
Pierre Ossman
fb450fba5d
Fix mismatches between format string and arguments
9 years ago
Pierre Ossman
64624342d9
Shorten stats from EncodeManager using SI/IEC prefixes
Also avoids %lld which isn't supported on Windows.
9 years ago
Pierre Ossman
620dd952f2
A switch() needs to handle every value in an enum
9 years ago
Pierre Ossman
28c1d54937
Switch to unsigned parameters for ExtendedDesktopSize handler
The constants used here are unsigned so it makes more sense that
the parameters are as well.
9 years ago
Pierre Ossman
5c23b9ed7d
Fix bad signed/unsigned comparisons
Either by casting, or switching to a more appropriate type
for the variable.
9 years ago
Pierre Ossman
a7bbe9c4a3
Make sure Exceptions do not use unsafe format strings
9 years ago
Pierre Ossman
5b3c5f49b1
Tag the Exception constructor as a printf function
This allows the compiler to analyse the format strings and
arguments for correctness.
9 years ago
Pierre Ossman
eb95532f5c
Remove unused variables
9 years ago
Pierre Ossman
da9a38d4e9
Handle no useful address types from getaddrinfo()
9 years ago
Pierre Ossman
f1a3501750
The compiler cannot figure out if this is assigned properly
The logic is a bit complex so we're going to have to silence the
warning with this explicit assignment.
9 years ago
Pierre Ossman
4daa7b1172
Default compression level should be interpreted as high
9 years ago
Pierre Ossman
eef5516854
Be more aggressive in finding solid rectangles
The previous FIXME was incorrect. The old code did in fact continue
looking over the entire area. This commit restores that old behaviour.
9 years ago
Pierre Ossman
20dd2a92de
Move encoder statistics into EncodeManager from SMsgWriter
It knows more details so it can track things better.
9 years ago
Pierre Ossman
a43a3f4e0e
Optimise fillRect()
It had regressed in performance compared to 1.3. This brings it back
up to the same speed.
9 years ago
Pierre Ossman
0f2fbc05e4
rfb::Region uses the Xregion library
9 years ago
Pierre Ossman
82c279e101
Add stream class to feed data from a file
9 years ago
Pierre Ossman
f38e243746
No need for this array to be writeable
9 years ago