Commit Graph

340 Commits

Author SHA1 Message Date
Marc-André Moreau
d8e10ac04a freerdp: patch leaks reported by valgrind when using TS Gateway 2014-12-11 11:25:34 -05:00
Armin Novak
f676c48a2f Fixed broken NULL pointer check. 2014-12-07 00:21:28 +01:00
Martin Fleisz
441632310a Merge pull request #2110 from akallabeth/winpr_backtrace_windows
Winpr backtrace windows
2014-12-04 15:03:37 +01:00
Armin Novak
eafc49b154 Using fixed size debug string buffers now. 2014-12-04 14:54:08 +01:00
Marc-André Moreau
8a7a71a7b6 Merge pull request #2213 from akallabeth/wlog_callback_appender
Wlog callback appender
2014-11-17 09:41:58 -05:00
Armin Novak
b920f9a081 Fixed null pointer dereference. 2014-11-17 00:50:15 +01:00
Armin Novak
54224d4155 Fixed memory leak. 2014-11-17 00:07:58 +01:00
Armin Novak
83f6b24b16 Fixed API nonnull warning. 2014-11-16 23:58:39 +01:00
Armin Novak
2e1c2555a2 Fixed typo. 2014-11-16 23:50:46 +01:00
Armin Novak
d525999a06 Fixed allocation size warning. 2014-11-16 23:43:18 +01:00
Armin Novak
d225b97078 Fixed allocation size warning. 2014-11-16 23:42:30 +01:00
Armin Novak
28220d5b9f Fixed allocation size warning. 2014-11-16 23:41:28 +01:00
Armin Novak
e256e14cc4 Fixed bad sizeof in calloc. 2014-11-16 22:43:11 +01:00
Armin Novak
2671482458 Fixed Stack_Free. 2014-11-16 16:48:50 +01:00
Armin Novak
45896e7a61 Fixed memory leak. 2014-11-16 15:51:45 +01:00
Armin Novak
b7304f16b8 Fixed memory leak. 2014-11-16 15:47:57 +01:00
Armin Novak
9ab5f4c222 Fixed memory leak. 2014-11-16 15:44:02 +01:00
Armin Novak
cf5b9a75b8 Fixed memory leak 2014-11-16 15:03:20 +01:00
Armin Novak
643a309537 Fixed memory leak. 2014-11-16 14:40:30 +01:00
Armin Novak
1b6cb6349e Added unit test for callback wlog appender. 2014-11-16 13:59:12 +01:00
Armin Novak
7697eafa02 Fixed callback appender setup. 2014-11-16 13:59:04 +01:00
Armin Novak
6de22298d0 Added callback appender for wlog. 2014-11-16 12:20:48 +01:00
Armin Novak
041c26eff6 Fixed mixed variable declaration. 2014-11-12 09:16:55 +01:00
Armin Novak
16f9f34b52 Removed assert, breaking build on visual studio. 2014-11-12 09:16:55 +01:00
Armin Novak
c39fbcfacb Fixed scope of variable declarations, MSVC does not like mixed variable declaration. 2014-11-12 09:16:55 +01:00
Armin Novak
56f087dfbc Fixed commented include. 2014-11-12 09:16:55 +01:00
Armin Novak
6c4f013bd9 Enhanced debug output, fixed missing includes. 2014-11-12 09:16:55 +01:00
Armin Novak
cbf70a3d75 Fixed missing include in unit test. 2014-11-12 09:16:55 +01:00
Armin Novak
f09aec878e Added unit test for backtrace. 2014-11-12 09:16:54 +01:00
Armin Novak
3830a9f580 Added windows implementation of backtrace. 2014-11-12 09:16:54 +01:00
Marc-André Moreau
334dec3c1f winpr: add pragma pack, bitmap + clipboard definitions 2014-10-16 21:45:47 -04:00
Marc-André Moreau
11ae267518 libfreerdp-core: expose new API to allow FreeRDS virtual channel hooking 2014-10-10 16:11:42 -04:00
Marc-André Moreau
b01ef89b3d libwinpr-utils: improve HashTable flexibility, add proper string support 2014-10-09 16:46:55 -04:00
Marc-André Moreau
cdbfc51daf libwinpr-utils: add .ini write support 2014-10-02 20:16:30 -04:00
Marc-André Moreau
d5cbadee9d libwinpr-utils: improve .ini file parser 2014-10-02 18:45:53 -04:00
Marc-André Moreau
abd87ace55 rdtk: initial commit 2014-09-29 16:08:08 -04:00
Marc-André Moreau
c5a0c7e97a libwinpr-utils: add simple image loading/writing test 2014-09-28 11:14:30 -04:00
Marc-André Moreau
1c34583407 libwinpr-utils: add png support 2014-09-28 11:02:39 -04:00
Marc-André Moreau
bbf4732470 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	libfreerdp/gdi/gdi.c
2014-09-25 10:34:56 -04:00
Bernhard Miklautz
417707e4b7 winpr-utils: extend LinkedList test 2014-09-24 13:03:46 +02:00
Bernhard Miklautz
7bd62a0127 winpr-utils: fix problem in LinkedList enumerator
A segfault can happen if LinkedList_Enumerator_MoveNext is invoked
before LinkedList_Enumerator_Reset was called.
2014-09-24 12:31:52 +02:00
Marc-André Moreau
09fc388e03 shadow: add RefreshRect/SuppressOutput support 2014-09-18 22:18:58 -04:00
Armin Novak
4004543a33 Default WLog_Level is now INFO. 2014-09-17 09:28:40 +02:00
Armin Novak
69c0aa4b22 Fixed missing log message formatting argument on android. 2014-09-16 10:14:18 +02:00
Bernhard Miklautz
2218e9684a Fix: misc compiler warnings
Seen in Xcode
2014-09-12 00:36:29 +02:00
Bernhard Miklautz
8dc70f4045 fix build warning
warning: implicit declaration of function ‘winpr_bitmap_write’
[-Wimplicit-function-declaration]
2014-09-11 17:26:01 +02:00
Armin Novak
38d110da03 Fixed string size calculation in winpr_HexDump 2014-09-11 13:59:48 +02:00
Armin Novak
cceb216e2e Replaced fprintf with WLog_ERR. 2014-09-09 16:35:04 +02:00
Armin Novak
41e7fdd95f Fixed missing initialisation of position variable. 2014-09-09 16:33:05 +02:00
Armin Novak
a15df299e9 Removed last remainig printf. 2014-09-09 16:32:23 +02:00
Armin Novak
25e9ebadc2 Using trio_snprintf now. 2014-09-09 16:32:22 +02:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
a738f3c6ce Added stacktrace in case of log recursion. 2014-09-09 16:32:04 +02:00
Armin Novak
7e3a1b3073 Now using macro to generate module specific log tag. 2014-09-09 16:32:04 +02:00
Armin Novak
3e21e570b8 Added recursion detection to WLog.
Dump functions now expect TAG and level as arguments.
2014-09-09 16:31:46 +02:00
Armin Novak
c32c48fbb6 Added recursion guard to logging functions. 2014-09-09 16:30:52 +02:00
Marc-André Moreau
fd7b9669a5 libfreerdp-codec: improve progressive unit tests 2014-09-03 18:47:02 -04:00
Marc-André Moreau
320b1d35ed libwinpr-utils: centralize bitmap utils 2014-09-03 16:20:50 -04:00
Marc-André Moreau
065d6f0c99 Merge pull request #2010 from hardening/list_return_value
Make LinkedList return errors when something fails
2014-08-18 13:05:18 -04:00
Armin Novak
fd2c1a7508 Fixed license header, added correct copyright. 2014-08-14 10:42:10 +02:00
Armin Novak
77ae3bc8b3 Fixed missing argument checks in logger, fixed crashes if file not created. 2014-08-14 10:38:02 +02:00
Armin Novak
494ca1f1a3 Added winpr functions to generate a stacktrace.
Added libcorkscrew headers for stacktrace on android.
Added execinfo.h detection for stacktrace on linux.
2014-08-14 10:36:50 +02:00
Armin Novak
93ad5b7335 Implemented default fnObjectEquals function.
Implemented ArrayList_Contains.
ArrayList_IndexOf and ArrayList_LastIndexOf now use comparison function.
2014-08-13 14:15:17 +02:00
Marc-André Moreau
dc7f89dbd5 Merge branch 'egfx' of github.com:awakecoding/FreeRDP 2014-08-11 17:25:38 -04:00
Armin Novak
e6ed76977a DEBUG_PRINT now a define, resolves linking issues.
Using log name as logcat tag now.
Removed log name from default android log formatting.
2014-08-07 21:51:52 +02:00
Armin Novak
1a37435a26 Added redirection of ConsoleAppender to logcat, if used on android.
Using custom default format for log messages on android.
2014-08-07 17:47:59 +02:00
Marc-André Moreau
22d3b6c74b libfreerdp-codec: remove old RemoteFX RLGR implementation in favour of faster one 2014-08-05 21:41:58 -04:00
Norbert Federa
9bde12f26a winpr/utils/ssl: fix comp warning and wrong param 2014-07-31 11:22:46 +02:00
Hardening
ff95b9aafa Make LinkedList return errors when something fails 2014-07-31 10:38:59 +02:00
Bernhard Miklautz
a9eed46e38 Fix warnings found in Xcode 2014-07-29 05:22:30 +02:00
Bernhard Miklautz
b8415af0d8 Fix compiler warnings.
This commit is based on pull request #1493
2014-07-29 05:22:29 +02:00
Norbert Federa
cdcdec99bc OpenSSL thread safety
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).
2014-07-28 21:55:57 +02: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
ac7d23b9a3 libfreerdp-gdi: migrate to _aligned_malloc/_aligned_free 2014-07-08 15:07:19 -04:00
Emmanuel Ledoux
9217de3bb1 winpr-utils: WLog_PrintMessageVA, include stdarg.h from wlog.h instead of wlog.c 2014-07-04 14:52:13 +02:00
Marc-André Moreau
78d3c82798 xfreerdp: fix multiple egfx-related memory leaks 2014-06-20 13:52:13 -04:00
Marc-André Moreau
ce6ff35297 xfreerdp: fix egfx off-by-one errors 2014-06-19 17:08:50 -04:00
Marc-André Moreau
42c83c25f8 Merge branch 'egfx' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	channels/tsmf/client/tsmf_main.c
2014-06-12 12:08:15 -04:00
Armin Novak
fb4fd9f5bb Added stream pool shrinking if large parts are unused. 2014-06-11 14:38:20 +02:00
Armin Novak
4325741583 Merge remote-tracking branch 'origin/master' into tsmf-gstreamer-1.0
Conflicts:
	client/X11/xf_client.c
2014-06-11 11:27:08 +02:00
Marc-André Moreau
c5a1a8ac27 libwinpr-sspi: fix native sspi build 2014-06-05 22:10:08 -04:00
Marc-André Moreau
1ddd6c5e0d libwinpr-utils: add WLog support for Win32 debugger console output 2014-05-31 10:10:19 -04:00
Marc-André Moreau
5b0a5dd3f1 libwinpr-utils: add WLOG_PREFIX environment variable 2014-05-29 15:42:32 -04:00
Marc-André Moreau
e5a77c3105 libwinpr-utils: add support for fine grained wlog filter 2014-05-29 15:23:15 -04:00
Marc-André Moreau
af6fb83d3b libwinpr-utils: extend wlog prefix format 2014-05-28 10:38:32 -04:00
Marc-André Moreau
ba5d84ee5c libwinpr-smartcard: add logging for each calls in smartcard inspector 2014-05-26 17:54:39 -04:00
Armin Novak
309405592e Fixed broken ArrayList_Remove and ArrayList_RemoveAt functions, freeing element now. 2014-05-23 13:43:14 +02:00
Marc-André Moreau
b8d60d5715 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-05-10 10:59:56 -04:00
Marc-André Moreau
fb3662c7e2 winpr: fix ranlib missing symbols warnings on OS X 2014-05-09 22:44:19 -04:00
Hardening
50f1f0df6f Add some const modifiers
This allows these functions to be used with const buffers.
2014-05-09 22:36:50 +02:00
Marc-André Moreau
a202fe4057 freerdp: fix several type related warnings 2014-05-08 18:02:02 -04:00
Marc-André Moreau
4460a1a7cf libwinpr-utils: flush file after each write in wlog 2014-05-05 18:04:20 -04:00
Marc-André Moreau
c2a59c23a7 libfreerdp-core: fix potential crash on session redirection failure 2014-04-28 16:44:52 -04:00
Marc-André Moreau
b67288868d Merge branch 'master' of github.com:awakecoding/FreeRDP into fdsapi 2014-04-27 19:18:23 -04:00
Zhang Zhaolong
196f5315ae libwinpr: fix memory leak in case realloc() failed. 2014-04-26 11:32:51 +08:00
Zhang Zhaolong
66dfc4fd5b winpr: fix error malloc size. 2014-04-25 21:14:10 +08:00
Bernhard Miklautz
b817e92e5e cmake: mark required libraries for export 2014-04-23 10:16:02 +02:00
Hardening
ef11358668 Enhance ListDictonnary
This patch enhances ListDictionnary so that you can set callbacks for
keys and for values.
2014-04-18 18:26:04 +02:00
Hardening
6febe88026 Fixes for queue and stack
This patch does misc fixes in queue and stack:
* the *_new() were not handling OOM correctly ;
* the *_Contains() methods were not using the equals cb;
* the lock were not always taken when accessing internal members;
2014-04-18 16:27:51 +02:00