Commit Graph

9952 Commits

Author SHA1 Message Date
Armin Novak
44fc5b521d Added support for OpenH264 1.6 2016-07-04 12:42:57 +02:00
David Fort
a132545545 Merge pull request #3428 from nfedera/fix-getcomputernameex-lentgh-calculation
winpr/sspi/ntlm: fix computer name len calculation
2016-06-30 22:43:05 +02:00
Norbert Federa
333a1110f5 winpr/sspi/ntlm: fix computer name len calculation
The lpnSize parameter for GetComputerNameEx specifies the total
size of the buffer (in characters).
However, the current code calculated the amount of bytes.
Since only GetComputerNameExA was used and because sizeof(CHAR) == 1
the result was correct but the math was wrong.
Credit goes to @byteboon
2016-06-30 17:15:40 +02:00
Bernhard Miklautz
c42d2ef0d1 Merge pull request #3426 from nfedera/fix-read-extended-info-packet
protocol violation: rdp_read_extended_info_packet
2016-06-27 15:28:22 +02:00
Norbert Federa
ae9460f02f protocol violation: rdp_read_extended_info_packet
The clientTimeZone and all subsequent fields in the Extended Info Packet
(MS RDPBCGR 2.2.1.11.1.1.1) are optional but were not handled as such.
2016-06-27 10:56:40 +02:00
Martin Fleisz
0d7a6b5596 Merge pull request #3418 from llyzs/rdpsnd_server_latency
rdpsnd/server: decrease audio latency and make it configurable.
2016-06-22 15:32:11 +02:00
Vic Lee
019a569d42 rdpsnd/server: decrease audio latency and make it configurable. 2016-06-21 17:22:43 +08:00
Bernhard Miklautz
e86f7c2fd0 Merge pull request #3408 from hendwolt/master
fix errors in xdg-shell-xml for protocol creation
2016-06-16 16:16:37 +02:00
Martin Fleisz
f166f5dc7a Merge pull request #3410 from nfedera/fix-symbols
Fix win32 linker hell and more
2016-06-16 14:46:27 +02: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
6a3b48d4f0 freerdp: remove static inet_ntop
inet_ntop is already implemented in winpr
2016-06-15 18:01:38 +02:00
Norbert Federa
7a68eebb03 cmake: remove some void statements and fix winpr source group 2016-06-15 13:54:31 +02:00
Norbert Federa
90cdfa7646 cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS 2016-06-15 13:36:27 +02:00
Norbert Federa
0ed98c4ee4 channels/audin/client/winmm: requires winpr 2016-06-15 13:30:38 +02:00
Hendrik Woltersdorf
8ea61fe55a fix errors in xdg-shell-xml for protocol creation 2016-06-14 20:43:35 +02:00
Bernhard Miklautz
50649acf47 Merge pull request #3407 from nfedera/enable-tests-on-windows
ci: build tests on windows from now on
2016-06-14 13:57:00 +02:00
Norbert Federa
675ea70e86 ci: build tests on windows from now on 2016-06-14 12:57:30 +02:00
Bernhard Miklautz
0cb37b0db8 Merge pull request #3406 from nfedera/fix-winpr-ntlm
winpr/sspi/ntlm: fix GetComputerNameExA parameters
2016-06-14 12:54:01 +02:00
Norbert Federa
26ed09a14f winpr/sspi/ntlm: fix GetComputerNameExA parameters
On input, the lpnSize [in, out] parameter for GetComputerNameEx()
specifies the total size of the buffer (in characters).
Several functions in ntlm.c were off by one which caused ntlm to fail
if the netbios hostname's strlen was exactly MAX_COMPUTERNAME_LENGTH.
2016-06-14 12:37:37 +02:00
akallabeth
f0bdd62e9c Merge pull request #3404 from nfedera/fix-pathmakepath
winpr: fix PathMakePathA and TestWLog
2016-06-14 10:20:52 +02:00
Norbert Federa
62d73dcb75 winpr: fix PathMakePathA and TestWLog
PathMakePathA:
- This function had an endless loop if no native delimiter was in the string
- Use SHCreateDirectoryExA on Windows
- Replaced old code with a new implementation

TestWLog:
- Windows has no "/tmp" by default
- Use GetKnownPath(KNOWN_PATH_TEMP) for the WLog "outputfilepath"
2016-06-13 19:19:28 +02:00
Bernhard Miklautz
ee4d118beb Merge pull request #3403 from TingPing/freerdp-client.pc
Fix include path in freerdp-client.pc
2016-06-13 10:06:51 +02:00
TingPing
9fe5da8597 Fix include path in freerdp-client.pc 2016-06-12 22:10:00 -04:00
Bernhard Miklautz
f818bab4b6 Merge pull request #3399 from nfedera/fix-winpr-library2
winpr/library: fix GetModuleFileName and tests
2016-06-10 15:08:49 +02:00
Norbert Federa
581c000435 winpr/library: fix GetModuleFileName and tests
- Use correct SetLastError values in GetModuleFileName
- Fix wrong return codes in GetModuleFileName
- Build the TestLibraryA/TestLibraryB libraries always shared and
  put them in the test output directory
- TestLibraryGetModuleFileName always returned success
- Improve TestLibraryGetModuleFileName to also check last error values
  and insufficient buffer sizes
- Change TestLibraryGetProcAddress and TestLibraryLoadLibrary to load
  the TestLibrary from the test executable's directory
2016-06-10 13:12:08 +02:00
Marc-André Moreau
0c8af43153 Merge pull request #3397 from awakecoding/master
add missing inet_pton implementation on Windows
2016-06-08 11:03:40 -04:00
Marc-André Moreau
f905861616 wayk-now: add missing inet_pton implementation on Windows 2016-06-08 10:51:58 -04:00
Bernhard Miklautz
b71f60c26e Merge pull request #3393 from nfedera/fix-winpr-library-wtimer-test
winpr: fix some tests
2016-06-08 11:50:43 +02:00
Hardening
a0520f84a3 Merge pull request #3394 from nfedera/fix-client-x11-locked-mutex
client/x11: don't close locked mutex
2016-06-08 08:21:13 +02:00
Norbert Federa
374f97aad3 client/x11: don't close locked mutex 2016-06-07 19:01:03 +02:00
Norbert Federa
f2c825bb76 winpr: fix some tests
TestNtCreateFile, TestPipeCreateNamedPipeOverlapped
- These tests are currently only expected to succeed on _WIN32
- Also reflect the reverse meaning of this fact in the return values

TestSynchWaitableTimer, TestSynchWaitableTimerAPC:
- These tests are currently expected to fail on __APPLE__
- Also reflect the reverse meaning of this fact in the return values

This logic makes sure that we don't forget to fix the tests if the
corresponding WinPR implementations are fixed.

TestLibrary:
- TestLibraryA and TestLibraryB must always get built as shared libraries
2016-06-07 17:20:56 +02:00
MartinHaimberger
0abb285c3d Merge pull request #3392 from nfedera/fix-winpr-barrier-deadlock
winpr/synch: fix barrier deadlock in release build
2016-06-07 15:33:49 +02:00
Norbert Federa
f969e60a53 winpr/synch: fix barrier deadlock in release build
Let the compiler know that we're comparing a volatile value.
Otherwise the compiler might nuke the comparison operation
and produce code that will spin endlessly.
2016-06-07 13:06:50 +02:00
Bernhard Miklautz
aa15327a3a Merge pull request #3391 from nfedera/fix-initializewaitabletimer-result
winpr/synch: fix InitializeWaitableTimer result
2016-06-07 09:34:12 +02:00
Norbert Federa
a35a1e3d9b winpr/synch: fix InitializeWaitableTimer result
InitializeWaitableTimer must not reported success if the operating
sytem does not provide the required functionality.
2016-06-06 23:06:12 +02:00
Norbert Federa
6e15931a52 Merge pull request #3390 from nfedera/fix-winpr-barrier2
winpr/synch: improve barrier test
2016-06-06 16:21:39 +02:00
Norbert Federa
131ffaa89b winpr/synch: improve barrier test
The SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY flag caused this test
to run extremely long if the system has very few processors.
Although this is expected (thread starvation) this will cause a
intolerably long execution time for automated tests.
Changed the number of threads to be calculated dyamically based
on the number of processors.
Also do proper cleanup to prevent memory leaks.
2016-06-06 15:41:05 +02:00
Bernhard Miklautz
bd71b3685b Merge pull request #3388 from nfedera/fix-winpr-pool-synch
winpr: several pool and synch fixes
2016-06-06 13:54:39 +02:00
Bernhard Miklautz
11ecda2ef3 Merge pull request #3386 from nfedera/fix-winpr-barrier
winpr/synch: rewrite barrier implementation & test
2016-06-06 13:44:48 +02:00
Bernhard Miklautz
a24d1fd4c7 Merge pull request #3389 from nfedera/fix-winpr-synch-timer-queue-segfault
winpr/synch: fix timerqueue segfault
2016-06-06 13:39:36 +02:00
Norbert Federa
e35049c20e winpr/synch: fix timerqueue segfault
The current experimental/incomplete WinPR timer queue implementation
has several race conditions.
This commit fixes a segfault caused by not unklinking freed timers
from the timer queue timers list.
2016-06-06 13:24:04 +02:00
akallabeth
8c4f3ba165 Merge pull request #3387 from nfedera/fix-wfreerdp-verify-cert-callback
wfreerdp: fix invalid VerifyCertificate callback
2016-06-06 09:23:41 +02:00
Norbert Federa
882f593328 wfreerdp: fix invalid VerifyCertificate callback 2016-06-04 17:13:07 +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
Norbert Federa
2dba082587 winpr/synch/barrier: fix return value and test
- According to the msdn docs DeleteSynchronizationBarrier always returns TRUE
- Added additional error checks to the barrier test
2016-06-04 13:40:01 +02:00
Norbert Federa
85f44262de winpr/synch: add spinning support to barrier
Implemented the SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY and
SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY flags.
2016-06-04 00:55:27 +02:00
Norbert Federa
341eed138f winpr/synch: rewrite barrier implementation & test
The synchronization barrier test as well as the actual WinPR
implementation were completely broken.
2016-06-03 18:56:36 +02:00
Bernhard Miklautz
8ea8b7c780 Merge pull request #3381 from nfedera/fix-winpr-misc
fix race conditions, tests and some invalid return values
2016-06-03 18:53:14 +02:00
Norbert Federa
458f606934 winpr/thread: fix SwitchToThread
On some operating systems sched_yield is a stub returning returning -1.
In that case use usleep which should at least trigger a context switch
if any thread is waiting.
2016-06-02 15:38:57 +02:00
Bernhard Miklautz
215e7b5562 Merge pull request #3382 from giox069/master
Fix some memory leaks in freerdp_settings_free()
2016-06-02 10:49:42 +02:00