If freerdp_abort_connect is called, set FREERDP_ERROR_CONNECT_CANCELLED
This way freerdp_reconnect can distinguish between network issues and
user interaction and abort a retry attempt.
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
The non blocking connect in freerdp_tcp_connect_multi did not
work reliably.
Fall back to blocking connect (which might take longer until the connection
is established) instead of not being able to connect at all.
There is no point in using BIO_free with a custom recursion
to free up stacked BIOs if there is already BIO_free_all.
Using it consistently avoids memory leaks due to stacked BIOs
not being recursively freed.
When the TLS connection is aborted early (certificate issues, ...)
the bio simple socket might not have been initialized.
Do not access the NULL pointer on cleanup.
buffer_size_warning: Calling strncpy with a maximum size argument of 108 bytes on destination array "addr.sun_path" of size 108 bytes might leave the destination string unterminated.
On Windows the sockaddr struct is smaller than sockaddr_in6.
This causes getsockname to fail because the buffer is too small.
The new code uses sockaddr_storage which should be large enough to
hold any supported protocol address structure.
See: http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/socket.h.html
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.