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
Pierre Ossman
7069bdd76a
Move reverse connection information into VNCSConnectionST
The only class that cares if connections are reversed or not is
VNCSConnectionST so let it keep track of this fact.
9 years ago
Pierre Ossman
f3b0ade08f
These methods aren't critical so no need for them to be pure
9 years ago
Pierre Ossman
0144c53353
Give subclasses the ability to overwrite the reader and writer
Needed for some tests.
9 years ago
Pierre Ossman
b7acf86aa9
SConnection internals should be private, just like for CConnection
9 years ago
Peter Åstrand (astrand)
11167e1f08
Use a common header file for Windows errno names.
In earlier Visual Studio and MinGW editions, BSD socket errno:s were
left undefined. This is no longer the case. This may cause build or
runtime errors. To avoid this, we are using a common header file which
corrects all definitions. This header will also be used with other
projects such as sercd, unfs3, PulseAudio etc.
9 years ago
Pierre Ossman
cc8c6a296f
Drop bundled zlib
We're not doing a sufficient job of keeping this updated so list
it as an external requirement instead.
9 years ago
Pierre Ossman
4e3e79dc7d
Make the calls to va_list logging functions more explicit
On some platforms va_list might be defined as something that causes
ambiguity and results in the wrong function being called.
9 years ago
Pierre Ossman
39b3b8f575
Add parameters to force IPv4/IPv6 selection
9 years ago