Commit Graph

536 Commits

Author SHA1 Message Date
Armin Novak
a7a7bab619 Fixed optional argument parsing. 2013-09-09 17:21:15 +02:00
Armin Novak
4274b266c0 Fixed command line parser, now printing help, if an invalid option is detected. 2013-09-09 16:07:14 +02:00
Marc-André Moreau
f790831e7d Merge branch 'master' of github.com:awakecoding/FreeRDP into xrdp-ng 2013-09-05 15:23:19 -04:00
Armin Novak
07139276b5 Added newlines at end of file, prevents clang from crashing... 2013-09-05 12:14:35 +02:00
Armin Novak
cf20efb4c6 Simplified code for FindFirstFileA, now always using FindClose
for cleanup.
2013-09-05 12:14:35 +02:00
Armin Novak
62356e667c Fixed erroneous patch. 2013-09-05 12:14:34 +02:00
Armin Novak
4331fa1f8b Fixed invalid API usage, ... 2013-09-05 12:14:34 +02:00
Armin Novak
e5c138a5b9 Fixed various memory leaks, allocation size issues and API misuse
warnings shown by clang as well as some compiler warnings.
2013-09-05 12:14:34 +02:00
Armin Novak
a3b531c036 Fixed issues found with clang-analyzer 2013-09-05 12:14:33 +02:00
Armin Novak
62330ca669 Fixed variable mixup. 2013-09-05 12:14:33 +02:00
Armin Novak
1e2455fa4a Fixed various memory leaks and compiler warnings. 2013-09-05 12:14:33 +02:00
Armin Novak
a355093219 Fixed coverity issue 1047645 2013-09-05 12:14:33 +02:00
Armin Novak
96285eec58 Fixed coverity issue 1047647 2013-09-05 12:14:33 +02:00
Armin Novak
d519bc3115 Fixed coverity issue 1047592 2013-09-05 12:14:33 +02:00
Armin Novak
629ac4ad28 Fixed coverity issue 1047588 2013-09-05 12:14:33 +02:00
Armin Novak
87a9a24ef2 Fixed coverity issue 1047593 2013-09-05 12:14:33 +02:00
Armin Novak
020bae25d7 Fixed coverity issue 1047594 2013-09-05 12:14:32 +02:00
Armin Novak
04e9338668 Fixed coverity issue 1047595 2013-09-05 12:14:32 +02:00
Armin Novak
0c08b584b8 Fixed coverity issue 1047596 2013-09-05 12:14:32 +02:00
Armin Novak
f231f3fcc5 Fixed coverity issue 1047597 2013-09-05 12:14:32 +02:00
Armin Novak
1673e526f5 Fixed coverity issue 1047598 2013-09-05 12:14:32 +02:00
Armin Novak
e2cd11332b Fixed coverity issue 1047599 2013-09-05 12:14:32 +02:00
Armin Novak
4bd1c567bd Fixed coverity issue 1047600 2013-09-05 12:14:32 +02:00
Armin Novak
64c3aafcc6 Fixed coverity issue 1047602 2013-09-05 12:14:32 +02:00
Armin Novak
53e0d53b99 Fixed coverity issue 1047603 2013-09-05 12:14:32 +02:00
Armin Novak
a55afb58a4 Fixed coverity issue 1047634 2013-09-05 12:14:31 +02:00
Marc-André Moreau
7edfe66274 freerdp: various missing link dependencies and symbol exports 2013-09-03 21:48:26 -04:00
Marc-André Moreau
41f53696d5 Merge branch 'xrdp-ng' of github.com:awakecoding/FreeRDP into xrdp-ng 2013-09-03 18:50:18 -04:00
Marc-André Moreau
ee36541fb7 freerdp: merge with master 2013-09-03 18:49:48 -04:00
Bernhard Miklautz
90c2cb22ab winpr: fixed test building 2013-08-29 09:44:41 +02:00
Marc-André Moreau
e429136c0c libwinpr-wtsapi: started internal RPC stubs 2013-08-23 00:06:22 -04:00
Marc-André Moreau
8423fccbc2 libwinpr-pipe: add support for overlapped i/o with named pipes (synchronous, compatible implementation) 2013-08-22 22:36:37 -04:00
Marc-André Moreau
c1625c1ead libwinpr-wtsapi: start implementation, extend NtApi 2013-08-22 19:20:59 -04:00
Marc-André Moreau
d5679889f3 libwinpr-nt: start implementing core NTDLL functions 2013-08-22 13:30:44 -04:00
Marc-André Moreau
68ec10a9d9 libwinpr-nt: implement NtCurrentTeb() 2013-08-22 10:18:38 -04:00
Marc-André Moreau
cea6de16ee libwinpr-wtsapi: add VC API 2013-08-20 15:22:31 -04:00
Marc-André Moreau
9d1dd14581 libwinpr-wtsapi: updated interface definition 2013-08-19 20:58:42 -04:00
Marc-André Moreau
7a88e7cb35 libwinpr-wtsapi: initial stubs 2013-08-19 20:38:43 -04:00
Marc-André Moreau
0ca78c877e libwinpr-wtsapi: added empty module 2013-08-19 19:18:31 -04:00
Marc-André Moreau
1068a1f3cc libwinpr-com: create empty module 2013-08-19 19:06:47 -04:00
Marc-André Moreau
d7656ada48 libfreerdp-codec: fix NSCodec encoding and buffer pool usage 2013-08-19 18:21:34 -04:00
Marc-André Moreau
317ffb2ca3 libwinpr-utils: backport fixed-size buffer pool inside variable size buffer pool 2013-08-19 17:14:24 -04:00
Armin Novak
2f20a8c12b Fixed various memory leaks and resource deallocation problems. 2013-08-19 17:44:52 +02:00
Armin Novak
1a3a6c3e0f Fixed check for _GNU_SOURCE pthread extensions. 2013-08-16 11:49:35 +02:00
Marc-André Moreau
1d3cf89cbc libwinpr-synch: fix wait.c build on Mac OS X 2013-08-15 15:02:24 -04:00
Marc-André Moreau
87593b4f19 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2013-08-15 13:16:05 -04:00
Marc-André Moreau
efff23acb5 Merge pull request #1395 from richterger/client_redir
Fix memory corruption in client redirection
2013-08-15 10:15:11 -07:00
Marc-André Moreau
9f25c4fc25 libfreerdp-codec: initial working fragmented NSCodec encoder 2013-08-15 13:13:02 -04:00
Marc-André Moreau
c149ede6f2 libwinpr-utils: add support for variable size buffer pool 2013-08-15 00:01:42 -04:00
Armin Novak
86fd873907 Added error messages for not implemented functions. 2013-08-14 13:19:57 +02:00
Armin Novak
0752597e00 Thread timed join now only available with _GUN_SOURCE. 2013-08-14 13:18:18 +02:00
Armin Novak
c3e847f472 Implemented timeouts for WaitForSingleObject.
Added assertions for functions not implemented.
2013-08-14 13:18:18 +02:00
Marc-André Moreau
b972830841 libfreerdp-codec: make use of ObjectPool for tiles 2013-08-13 09:34:15 -04:00
Marc-André Moreau
f8e870a258 libwinpr-utils: implement asynchronous mode for ListDictionary 2013-08-12 17:48:32 -04:00
Marc-André Moreau
356186ed54 Merge branch 'master' of github.com:awakecoding/FreeRDP 2013-08-12 12:09:44 -04:00
Marc-André Moreau
bb30ceb006 mfreerdp: cleanup 2013-08-09 21:23:08 -04:00
Alessandro Pilotti
644e0efa76 Fixes libwinpr build issue on Windows
Adds conditional statements in file.c to solve a Posix portability
issue on Windows introduced with the following commit:

913d532e0d
2013-08-09 02:45:31 +03:00
Marc-André Moreau
e31b9b7709 libwinpr-pipe: add missing link dependency 2013-08-07 16:00:21 -04:00
Marc-André Moreau
a9bf93ed6a libwinpr-pipe: add missing link dependencies for test code 2013-08-07 15:56:05 -04:00
Marc-André Moreau
34f9985add freerdp: merge with master 2013-08-07 15:48:57 -04:00
Marc-André Moreau
331933635c Merge pull request #1401 from nfedera/fix-2013-08-07-02
libwinpr-utils: Use criticalsection with spincount
2013-08-07 12:35:46 -07:00
Norbert Federa
3a58934eb2 libwinpr-utils: Use criticalsection with spincount
Use InitializeCriticalSectionAndSpinCount instead of IntializeCriticalSection.
Using spin counts for critical sections of short duration enables the calling
thread to avoid the wait operation in most situations which can dramatically
improve the overall performance on multiprocessor systems.

On Linux this change has no effect because the new winpr critical section
implementation does not use the SpinCount field under Linux because the NPTL
synchronization primitives are implemented using the extremely performant
futex system calls which have this magic already built in.

However, on Mac OS X this change improved the overall performance of the
multithreaded RemoteFX decoder by 25 percent.

I've used a SpinCount of 4000 which avoided 99 percent of the wait calls.
This value is also used by Microsoft's heap manager for its per-heap
critical sections.

Note: This change requires pull request #1397 to be merged.
2013-08-07 18:16:01 +02:00
Norbert Federa
2b25b4a520 libwinpr-sync: New complete critical section code
- Complete implementation including recursion support
- Added an intensive ctest (TestSynchCritical)
- Struct members are used exactly as Windows does it internally:
  LockCount starts at -1, RecursionCount at 0
- Same performance optimizations as internally on Windows:
    - Fast lock acquisition path using CAS -> SpinCount -> wait
    - SpinCount automatically disabled on uniprocessor systems
- On Linux SpinCount is disabled because it provided no advantage over NPTL/futex in all tests

Support for CRITICAL_SECTION's DebugInfo is not yet included (but trivial to add).
2013-08-07 10:20:04 +02:00
richterger
505facbb6f Fix off by one problem in StreamPool allocation 2013-08-07 08:01:33 +02:00
Marc-André Moreau
7b80b19306 cmake: add FindPixman.cmake 2013-08-05 20:50:23 -04:00
Marc-André Moreau
13872f33bf libwinpr-utils: implement doubly-linked list 2013-08-05 17:29:14 -04:00
Marc-André Moreau
190ed85a3d libwinpr-synch: add detection of timerfd support 2013-08-03 19:50:17 -04:00
Marc-André Moreau
ecc543d87d Merge branch 'master' of github.com:FreeRDP/FreeRDP into multitouch 2013-08-03 16:22:09 -04:00
Norbert Federa
81ef251fc8 winpr: improve and fix locking for data structures
- Improved/completed(almost) winpr's critical section implementation
- Replaced WaitForSingleObject locking with critical sections

Note:
WaitForSingleObject should _never_ be used for granular low-contention
locks as it _always_ enters the kernel.

Just replacing WaitForSingleObject locking in Bufferpool with
EnterCriticalSection boosts the multithreaded rfx decoder
performance by almost 400% on win32.
2013-08-02 12:07:05 +02:00
Marc-André Moreau
913d532e0d winpr: fix build on Linux 2013-07-30 10:57:54 -04:00
Marc-André Moreau
4d2bc6ba46 libwinpr-synch: add unit tests, initial waitable timer support 2013-07-29 13:07:39 -04:00
Marc-André Moreau
007bd87ff4 libwinpr-synch: start implementing waitable timers 2013-07-29 11:57:29 -04:00
Marc-André Moreau
8a4e83bdfb libfreerdp-core: fix server-side update encoding edge case 2013-07-28 16:31:38 -04:00
Benoît LeBlanc
03a401b8e6 CMakelists:
disabled installation of headers and libraries for the wayk client.
2013-07-25 21:59:21 -04:00
Marc-André Moreau
bef2ad5c92 libwinpr-pipe: added overlapped io tests for named pipes 2013-07-23 15:03:08 -04:00
Marc-André Moreau
507899ade9 libwinpr-pipe: initial basic named pipe support 2013-07-22 23:17:08 -04:00
Marc-André Moreau
65bc944def libwinpr-pipe: implement of more named pipes 2013-07-22 22:53:44 -04:00
Marc-André Moreau
afe1f22bcf libwinpr-pipe: start implementing named pipes 2013-07-22 18:20:34 -04:00
Marc-André Moreau
c6764f9034 libwinpr-pipe: added stubs for named pipes 2013-07-22 16:30:25 -04:00
Benoît LeBlanc
163cc975d9 Merge branch 'master' of git://github.com/awakecoding/FreeRDP
# By Marc-André Moreau
# Via Marc-André Moreau
* 'master' of git://github.com/awakecoding/FreeRDP:
  libwinpr-utils: implement ListDictionary
2013-07-07 22:02:09 -04:00
Marc-André Moreau
b3265b6958 libwinpr-utils: implement ListDictionary 2013-07-05 18:23:26 -04:00
Benoît LeBlanc
d72452b4f5 Merge branch 'master' of git://github.com/awakecoding/FreeRDP
# By Bernhard Miklautz (4) and others
# Via Marc-André Moreau
* 'master' of git://github.com/awakecoding/FreeRDP:
  libfreerdp-core: fix unused variable
  libfreerdp-codec: add bitmap encoder
  cmdline: unix/windows return detected error
  client/common: fixed command line parsing issue
  channels/serial: bring it back to life
  nla: invalidate sec handle after creation
  tls: updated certificate mismatch message
2013-07-05 16:35:08 -04:00
Benoît LeBlanc
c17c2f811b FreeRDP:
- replaced char* by const char* in function prototypes
- MacFreeRDP: moved assignation of context function pointers
- freerdp: added more pointer and return value validations to prevent crashes
2013-07-04 14:42:40 -04:00
Bernhard Miklautz
0773bb9303 nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.

This fixes a segfault in the server part if the client disconnects before
the authentication was finished.
2013-07-01 19:24:19 +02:00
Marc-André Moreau
863b51f938 freerdp: merge with master 2013-06-28 12:50:24 -04:00
Marc-André Moreau
48347b1f4d Merge pull request #1305 from bmiklautz/mem_alignment
winpr: offset support in _aligned_offset_malloc
2013-06-28 09:39:02 -07:00
Marc-André Moreau
3fbc4f899f libwinpr-utils: fix deadlock in PubSub 2013-06-27 14:16:50 -04:00
Martin Fleisz
14e81877fb Merge pull request #1294 from bmiklautz/null_handle
winpr: check added if handle is NULL
2013-06-26 05:48:30 -07:00
Norbert Federa
786df03bb6 libwinpr-synch: fix broken USleep (on WIN32)
Also reduce CPU usage by reducing the max busy-looping time to 1ms
2013-06-25 16:33:40 +02:00
Bernhard Miklautz
b0d69caee8 winpr/alignment: use size_t instead of UINT32 2013-06-19 19:07:31 +02:00
Marc-André Moreau
fbf3208b0a libwinpr-utils: rename certain PubSub functions 2013-06-18 21:23:26 -04:00
Bernhard Miklautz
40ea683982 winpr: offset support in _aligned_offset_malloc
Added support to handle offset parameter in _aligned_offset_ functions.
fixes #1299
2013-06-18 18:43:59 +02:00
Marc-André Moreau
508bae674b libwinpr-utils: improve PubSub with automatic strongly-typed helpers 2013-06-18 00:39:48 -04:00
Marc-André Moreau
e77d4657e4 libwinpr-utils: add PubSub multiplexing and synchronized access 2013-06-15 18:18:02 -04:00
Marc-André Moreau
95a129eb69 libfreerdp-client: start splitting termination and printing logic for CLI parsing 2013-06-15 15:13:38 -04:00
Marc-André Moreau
8ad532a9d4 libwinpr-utils: implement basic Publisher/Subscriber pattern 2013-06-15 13:32:13 -04:00
Marc-André Moreau
174d1bdd71 libwinpr-utils: start implementing Publisher/Subscriber pattern 2013-06-14 16:55:05 -04:00
Christian Plattner
9373787fb1 winpr: check added if handle is NULL 2013-06-14 15:41:06 +02:00
Marc-André Moreau
2bd6808432 freerdp: merge with master 2013-06-05 10:31:01 -04:00
Daryl Poe
86156ce61f fix memory errors due to too-large memcpy in ArrayList 2013-06-03 09:30:14 -06:00
Marc-André Moreau
9d3ec97f9e freerdp: fix monolithic build with Xcode 2013-05-24 18:38:02 -04:00
Marc-André Moreau
8a2220a3d9 libwinpr-synch: remove unnecessary critical section 2013-05-16 19:27:12 -04:00
Marc-André Moreau
c0160b8015 libwinpr-handle: reduce usage of unneeded handle management functions 2013-05-16 18:27:26 -04:00
Marc-André Moreau
23e8af45f0 libwinpr-handle: don't use a centralized handle table as it was a major performance bottleneck 2013-05-16 18:14:37 -04:00
Marc-André Moreau
f8b24826da libwinpr-handle: optimize handle table lookup 2013-05-16 17:49:41 -04:00
Marc-André Moreau
72e9087d1f winpr: unify handle types 2013-05-16 17:32:58 -04:00
Marc-André Moreau
e8c5e6c70b libfreerdp-core: send using separate streams, re-enable frame acks 2013-05-15 18:05:40 -04:00
Marc-André Moreau
54281cac13 libwinpr-utils: grow stream by a factor of two 2013-05-15 16:22:58 -04:00
Marc-André Moreau
367ebf32a3 freerdp: make use of stream macros to access members 2013-05-15 12:14:26 -04:00
Marc-André Moreau
fdf3ddcf9e freerdp: purge deprecated stream utils 2013-05-08 17:48:30 -04:00
Marc-André Moreau
9bf924929c xfreerdp-server: use libwinpr-input for keyboard mapping 2013-05-02 01:34:54 -04:00
Marc-André Moreau
b4cac74136 xfreerdp-server: fix RemoteFX encoding 2013-05-01 18:15:55 -04:00
Marc-André Moreau
e88b59c32c libfreerdp-core: improve async-transport mode 2013-04-30 17:16:38 -04:00
Marc-André Moreau
c49c235c93 libwinpr-utils: fix stream pool 2013-04-30 00:36:16 -04:00
Marc-André Moreau
83af4266bf libfreerdp-core: refactor fastpath fragmentation 2013-04-29 23:55:44 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Marc-André Moreau
fae24b1ef9 xfreerdp-server: auto-generate self-signed certificate 2013-04-23 18:17:01 -04:00
Marc-André Moreau
d04b76d005 libfreerdp-core: use stream pool 2013-04-12 13:44:23 -04:00
Marc-André Moreau
0fded8c2d0 winpr-utils: fix StreamPool 2013-04-12 12:20:20 -04:00
Marc-André Moreau
f94f90c08b winpr-utils: initial stream pool implementation 2013-04-11 21:59:02 -04:00
Marc-André Moreau
e7436a1a9d wfreerdp: minor 64-bit fixes 2013-04-10 21:15:38 -04:00
Marc-André Moreau
0cbdd6b641 freerdp: merge with master 2013-04-09 10:18:03 -04:00
Marc-André Moreau
c48a7bc5f1 Merge pull request #1169 from hardening/scancode_fix
Small correctly in GetVirtualKeyCodeFromVirtualScanCode
2013-04-06 13:30:36 -07:00
Hardening
37e2f97180 Small correctly in GetVirtualKeyCodeFromVirtualScanCode
this function was not doing his job, this patch fixes it.
2013-04-06 22:22:55 +02:00
Marc-André Moreau
f778cd38c3 Merge pull request #1161 from bmiklautz/mutex_init
winpr/mutex: Support for bInitialOwner in CreateMutex
2013-04-04 14:22:24 -07:00
Bernhard Miklautz
aea81fb5c8 winpr/mutex: Support for bInitialOwner in CreateMutex 2013-04-03 19:35:45 +02:00
Marc-André Moreau
022ceec22a xfreerdp: split client into executable and library 2013-04-02 16:22:30 -04:00
Marc-André Moreau
d13f89d359 xfreerdp: modify way to return thread exit code 2013-04-02 14:51:12 -04:00
Martin Fleisz
8d16086969 Android: Fix crash after changes in FreeRDP directory handling 2013-04-02 06:33:59 -07:00
Marc-André Moreau
c65ee0c2f4 wfreerdp: fix build on Windows 2013-03-29 00:33:15 -04:00
Hardening
7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau
8b9ea43d78 libfreerdp-core: fix locking with TS Gateway 2013-03-27 20:06:10 -04:00
Marc-André Moreau
6f69b8a22f wfreerdp: fix build 2013-03-26 15:02:33 -04:00
Marc-André Moreau
690b5147db cmake: simplify android build 2013-03-23 18:13:10 -04:00
Marc-André Moreau
b4f70ed8fd libwinpr-path: rename known path constants 2013-03-22 16:03:42 -04:00
Marc-André Moreau
068f0de4d4 libfreerdp-utils: purge old file utils 2013-03-22 15:52:43 -04:00
Marc-André Moreau
edf6e7258d libwinpr-path: add path detection functions 2013-03-22 00:42:09 -04:00
Marc-André Moreau
27dc85bed9 libwinpr-utils: add trio portable printf implementation 2013-03-21 21:30:31 -04:00
Marc-André Moreau
a8201b0d1b libwinpr-utils: combine old and new stream utils 2013-03-21 15:19:33 -04:00
Marc-André Moreau
882c914e6c channels/tsmf: fix build 2013-03-21 14:45:03 -04:00
Bernhard Miklautz
0a90bec26f winpr/dsparse: removed autogenerated test file 2013-03-15 23:15:59 +01:00
Bernhard Miklautz
6b1a414b36 winpr/sspi: disable test TestSchannel 2013-03-15 23:11:17 +01:00
Bernhard Miklautz
f6810fb138 Fixed warnings for 32 bit builds 2013-03-15 22:49:25 +01:00
Bernhard Miklautz
1519152709 winpr/sspi: fixed test TestInitializeSecurityContext 2013-03-15 21:47:24 +01:00
Bernhard Miklautz
e4aef1b07f Merge remote-tracking branch 'upstream/master' into fix_warnings 2013-03-15 20:43:57 +01: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
Bernhard Miklautz
77df254265 Fixed some build warnings 2013-03-15 18:22:49 +01:00
Bernhard Miklautz
d7b4f68b0c winpr/sysinfo: cleaned up cpu flag tests 2013-03-15 01:31:48 +01:00
Bernhard Miklautz
3bac044825 winpr/sysinfo: fixes and detection for avx PCLMULQDQ added
- fixed defines for avx aes detection
- added detection for avx carry less multiplication (PF_EX_AVX_PCLMULQDQ)
2013-03-15 01:06:33 +01:00