* Borrowed eventfd_read and eventfd_write from bionic for uclibc compatibility (uclibc headers are broken unfortunately). Bionic and
FreeRDP are both under the Apache 2.0 license.
freerdp/winpr had the following issues:
* The non reentrant SSL_library_init() was called concurrently (crash)
* Missing code/api to set the eventually required OpenSSL static and dynamic locking callbacks
* Missing code/api to free the application-global or thread-local OpenSSL data and tables
This commit creates two new winpr functions:
BOOL winpr_InitializeSSL(DWORD flags):
Use the flag WINPR_SSL_INIT_ALREADY_INITIALIZED if you want to tell winpr that
your application has already initialized OpenSSL.
If required use the flag WINPR_SSL_INIT_ENABLE_LOCKING to tell winpr that it
should set the OpenSSL static and dynamic locking callbacks.
Otherwise just call it with the flag WINPR_SSL_INIT_DEFAULT.
The recommended way is that your application calls this function once before
any threads are created. However, in order to support lazy OpenSSL library
initialization winpr_InitializeSSL() can also safely be called multiple times
and concurrently because it uses the new InitOnceExecuteOnce() function to
guarantee that the initialization is only performed successfully once during
the life time of the calling process.
BOOL winpr_CleanupSSL(DWORD flags):
If you create a thread that uses SSL you should call this function before the
thread returns using the flag WINPR_SSL_CLEANUP_THREAD in order to clean up
the thread-local OpenSSL data and tables.
Call the function with the flag WINPR_SSL_CLEANUP_GLOBAL before terminating
your application.
Note: This commit only replaced the current occurences of the
SSL_load_error_strings(); SSL_library_init(); pairs in the freerdp source
with winpr_InitializeSSL(). None of the server or client applications has been
changed according to the recommended usage described above (TBDL).
This resulted in huge memory leaks - 8MB per thread, depending on
the system's default stack size.
The leak happend even if CloseHandle() was correctly used to "detach"
the thread but WaitForSingleObject was never called.
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.
The only exception is winpr-makecert-tool which is still build as extra
library.
This obsoletes complex_libraries for winpr.
select() has the major drawback that it cannot handle file descriptor
that are bigger than 1024. This patch makes use of poll() instead of
select() when poll() support is available.
# By Marc-André Moreau (27) and others
# Via Marc-André Moreau
* 'master' of git://github.com/awakecoding/FreeRDP: (48 commits)
afreerdp: fix build on Android
libwinpr-wtsapi: include wtsapi32.h on Windows
wfreerdp: fix target exporting
wfreerdp: fix building against OpenSSL with MONOLITHIC_BUILD and shared libraries
wfreerdp: fix test build issues
libwinpr-crypto: implement CryptProtectMemory/CryptUnprotectMemory
libwinpr-memory: add missing definitions
libwinpr-memory: start stubbing
Increased size of stream on GCC conference create request from 512 to 1024. For large numbers of static virtual channels, the stream was being overflowed and was causing crashes.
Fixes to process new command line options (autodetect, heartbeat, multitransport), join the MCS message channel and process auto-detect PDUs during the connection sequence.
wfreerdp: fix build against static openssl library
winpr-hash: fix building against openssl in static mode
libfreerdp-gdi: fix invalidation of region with line drawing
mfreerdp: fix hungarian keyboard '0' and 'i' key inversion
Fixes build issue on Windows
libwinpr-synch: add active/inactive linked list for timer queue
libwinpr-synch: improve timer queue implementation
libwinpr-synch: make use of head's expiration time in timer queue
libwinpr-synch: make use of timespec for timer queue
libwinpr-synch: improve timer queue implementation
...
Conflicts:
client/common/CMakeLists.txt