Commit Graph

51 Commits

Author SHA1 Message Date
Armin Novak
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak
a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Armin Novak
2b8bc8ea5e Fixed unused argument warnings. 2020-01-23 10:12:12 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Bernhard Miklautz
f867c90e4c
Merge pull request #5308 from akallabeth/fix_win32_overlinking
Fixed windows overlinking.
2019-05-03 12:01:51 +02:00
Armin Novak
cfdcaa2653 Fixed sign-compare warnings 2019-04-05 09:13:25 +02:00
Armin Novak
8e0565b2bd Fixed windows overlinking. 2019-03-18 15:10:21 +01:00
Armin Novak
66cc038c93 Fixed threadpool work function return and arguments. 2018-03-07 14:36:55 +01:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
89859d4c54 Fixed missing error return. 2018-02-14 13:51:38 +01:00
Armin Novak
6a21bdae3d Fixed various scanbuild warnings. 2017-12-21 09:34:35 +01:00
Armin Novak
7305828122 Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Norbert Federa
27c439675f winpr: fix win32 linking issues
Depending on the windows target version (_WIN32_WINNT), the used
SDK and the build configuration the linker will see multiple
libraries exporting the same symbols.
To prevent ugly hacks (e.g. modifying cmake's default system
libraries or fragile library linking order chains) we prefix
these functions with "winpr_" and create corresponding defines
to keep the current api names.
2016-06-16 11:47:33 +02:00
Norbert Federa
c16bee759f winpr: several pool and synch fixes
pool:
- the winpr implementation fallback was not used on older windows editions
- drop useless and conflicting TP_CALLBACK_ENVIRON_V3
- fix race conditions by using use proper one-time initialization
- on win32 WinPR tried to load several pool/callback_environment functions
  from kernel32.dll but since these are defined as inline functions in the
  windows headers, no windows edition has ever exported them in any dll.
- removed callback_environment.c and added corresponding static inline
  function to pool.h
- fix segfault in TestPoolWork: CloseThreadpoolWork() must not be called
  if there is a cleanup group associated with the work object since calling
  CloseThreadpoolCleanupGroupMember() already releases the work object

sync:
- The windows headers incorrectly define InitializeCriticalEx support if
  _WIN32_WINNT >= 0x0403 instead of >= 0x0600 (Vista)
- created a compatible define to deal with this issue
2016-06-04 17:09:48 +02:00
Marc-André Moreau
ceefc4b099 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-07 10:19:50 -05:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Marc-André Moreau
d0f413db12 winpr: initial port to Universal Windows Platform (UWP) 2016-02-05 16:28:45 -05:00
Marc-André Moreau
c0c9c9353e winpr: more Win32 fixes 2015-11-25 14:41:32 -05:00
Hardening
f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
Norbert Federa
25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55:48 +02:00
Norbert Federa
ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Marc-André Moreau
68ee5df7d9 winpr: fix build warnings 2014-11-11 11:21:34 -05:00
Armin Novak
c304f457cf Implemented thread handling for WaitForMultipleObjects.
Implemented thread specific functions.
2014-10-27 11:23:15 +01:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
7e3a1b3073 Now using macro to generate module specific log tag. 2014-09-09 16:32:04 +02:00
Armin Novak
28ece6bb46 Replaced stdio logging with WLog 2014-09-09 16:31:46 +02:00
Marc-André Moreau
e6f4754ed3 winpr: improve windows builds across visual studio versions and toolsets 2014-07-17 15:11:04 -04:00
Armin Novak
ad3255354d Added WITH_LIBRARY_VERSIONING, allowing to build shared libraries without
SOVERSION information. (required by Android)
2014-07-11 11:53:58 +02:00
Bernhard Miklautz
6a49bcfe40 winpr: always build "monolitic"
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.
2014-07-10 11:10:58 +02:00
Marc-André Moreau
a202fe4057 freerdp: fix several type related warnings 2014-05-08 18:02:02 -04:00
Marc-André Moreau
59df3ca733 Merge pull request #1806 from bmiklautz/feat/export_modules
Improve pkg-config file generation
2014-04-23 19:37:53 -04:00
Hardening
9d2ea1fcd8 Fix Thread handle leak
When a thread pool is release the Thread handle is leaked.
2014-04-23 16:59:14 +02:00
Bernhard Miklautz
b817e92e5e cmake: mark required libraries for export 2014-04-23 10:16:02 +02:00
Marc-André Moreau
55565e056c freerdp: export targets 2013-10-28 23:06:39 -04:00
Bernhard Miklautz
103171a98e Fixed compiler warnings (-Wall) 2013-03-15 20:41:10 +01:00
Bernhard Miklautz
e8eb0d0b44 Fixed formating build warnings (-Wformat) 2013-03-15 20:03:48 +01:00
hardening
865ff2a5f8 Fixed compilation with -Wstrict-prototypes 2013-02-14 22:20:43 +01:00
Bernhard Miklautz
f54f6ce196 winpr/pool: zero thread pool on creation 2013-01-24 17:17:12 +01:00
Marc-André Moreau
94ad538185 libfreerdp-codec: added registry keys for multithreaded RemoteFX decoder 2013-01-22 21:54:13 -05:00
Marc-André Moreau
438a727c6b libfreerdp-codec: start parallel decoding of RemoteFX tiles 2013-01-22 18:14:50 -05:00
Marc-André Moreau
fb189989af libwinpr-pool: fix InitializeThreadpoolEnvironment 2013-01-22 17:24:57 -05:00
Marc-André Moreau
74bba0e767 libwinpr-pool: improve thread pool API on Linux 2013-01-22 16:19:32 -05:00
Marc-André Moreau
a98b8a1390 libwinpr-pool: improve Windows implementation 2013-01-21 23:34:46 -05:00
Marc-André Moreau
d4d19d6473 libwinpr-pool: implement WaitForThreadpoolWorkCallbacks 2013-01-21 19:22:08 -05:00
Marc-André Moreau
025b5bab68 libwinpr-pool: start implementing scheduling of asynchronous calls 2013-01-21 18:33:00 -05:00
Marc-André Moreau
ad9769dfe7 libwinpr-pool: make tests pass on Windows 2013-01-20 22:39:32 -05:00
Marc-André Moreau
c048dc4cc4 libwinpr-pool: add test stubs 2013-01-20 21:15:55 -05:00
Marc-André Moreau
0e02134c40 libwinpr-crypto: started stubbing CryptoAPI 2012-12-22 02:23:58 -05:00