Commit Graph

228 Commits

Author SHA1 Message Date
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Armin Novak
57901b8add Added detach support for microphone 2016-12-19 17:13:25 +01:00
Armin Novak
9f19da798c Added attach/detach support for channels. 2016-12-19 17:07:01 +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
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Martin Fleisz
0febd9c7cd Merge pull request #3563 from akallabeth/android_update
Android fix warnings, visibility and formatting
2016-11-24 12:59:30 +01:00
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -05:00
Armin Novak
6ca5a1324f Android: fixed warnings, reformatted. 2016-10-17 10:21:23 +02:00
Armin Novak
943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak
376dc216e6 Fixed uninitialized value. 2016-10-06 13:43:15 +02:00
Armin Novak
b03e47166e Fixed NULL pointer checks. 2016-10-06 13:43:14 +02:00
Armin Novak
9f5da483dc Reformatted files touched in last 2 commits. 2016-10-06 13:43:12 +02:00
Armin Novak
88a3b8dd76 Initializing channel context in each thread. 2016-10-06 13:43:12 +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
Armin Novak
704d69d540 Fixed NULL pointer access. 2016-05-12 09:28:12 +02:00
Marc-André Moreau
915b9a15b1 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	winpr/libwinpr/bcrypt/CMakeLists.txt
2016-05-11 11:05:17 -04:00
Bernhard Miklautz
62cb5fac44 build: add missing dependencies
Add all missing dependencies found when building with
STATIC_CHANNELS=OFF.

Fixes #3281
2016-04-15 14:32:40 +02:00
Bernhard Miklautz
783807229d build: add missing dependencies
Add all missing dependencies found with --no-undefined. Since
dependencies aren't exported anymore (if not required) it is no necessary
to explicitly list all required libraries.
2016-04-07 15:10:00 +02:00
Marc-André Moreau
9211f44e46 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-15 20:19:15 -04:00
Armin Novak
36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
zihao.jiang
40ea6e9228 audin: Fixed default sys argument for audin
PR #3173 fixed argument parsing. However it breaks the usage without specifying subsystem: "/microphone"
In particular, aFreerdp microphone redirect is broken as it exactly uses "/microphone"
This PR fixes the regression.
Fix: We should not call CommandLineParseArgumentsA if argc is only 1 (same case as rdpsnd_main.c)
2016-03-11 01:52:18 +08:00
Marc-André Moreau
ceefc4b099 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-07 10:19:50 -05:00
Bernhard Miklautz
120bd2d8bd Merge pull request #3173 from akallabeth/audin_arg_fix
Fixed argument parsing for audin.
2016-03-03 20:39:31 +01:00
Armin Novak
fb88ad0ee6 Fixed symbol export for sound plugins. 2016-03-03 17:17:13 +01:00
Bernhard Miklautz
25506348d0 Merge pull request #3168 from akallabeth/visibility_fixes
Fixed default visibility.
2016-02-29 16:59:58 +01:00
Armin Novak
5acd80dd5b Exporting channel entry points. 2016-02-29 15:18:19 +01:00
Armin Novak
8482fbf854 Fixed formatting. 2016-02-29 12:34:53 +01:00
Armin Novak
71bea3e1d0 Fixed argument parsing for audin. 2016-02-28 19:56:57 +01:00
zihao.jiang
17139b9fe6 android: Fix sound redirection.
After #3097, the java side pass command line argument to JNI for freerdp settings. However there's several issues need to be fixed:
1. The argument /sound should be appended if freerdp is required to play sound at local device
2. The option value for "audio-mode" is not correct.
It should match the definition in client/common/cmdline.c
/* Audio Mode */
define AUDIO_MODE_REDIRECT     0 /* Bring to this computer */
define AUDIO_MODE_PLAY_ON_SERVER   1 /* Leave at remote computer */
define AUDIO_MODE_NONE         2 /* Do not play */
3. Uncomment support for WAVE_FORMAT_PCM in audin. I tested on my android phone and Nokia N1 tablet. It works on both device
2016-02-28 13:43:11 +08:00
Marc-André Moreau
8fa25aae6a mfreerdp: fix build on 32-bit with mac audio 2016-02-16 13:42:08 -05:00
Bernhard Miklautz
6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Bernhard Miklautz
97edeca204 Merge pull request #2874 from akallabeth/stdtypes
Using stdint.h and stdbool.h for type definitions
2015-12-17 16:37:54 +01:00
Armin Novak
cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00
Armin Novak
90251f5e0d Fixed OnNewChannelConnection arguments 2015-12-14 14:18:50 +01:00
Armin Novak
f4a466b798 Added mac implementation. 2015-11-13 11:47:58 +01:00
Armin Novak
f6e17ec65c Added audin support for mac os. 2015-11-12 16:10:39 +01:00
MartinHaimberger
d4d360f6a4 Merge pull request #2859 from akallabeth/resource_leak_fix
Fixes API misuse and logic errors
2015-09-15 14:45:42 +02:00
Armin Novak
d07875b7ea Fixed error checking and recording reset. 2015-09-07 09:25:48 +02:00
Armin Novak
7cd3da9699 Fixed error handling of OSS audio plugin. 2015-09-01 12:25:38 +02:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger
65fd259610 misc fixes:
fixed all bugs from the review
checking all WaitFor*Object/s calls
2015-07-30 06:49:21 -07:00
Martin Haimberger
58ada13dd9 fixed some remakes and compiler errors 2015-07-22 02:36:24 -07:00
Martin Haimberger
e682329eeb fixed compiler errors 2015-07-15 03:17:38 -07:00
Martin Haimberger
6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
Armin Novak
cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +02:00
Marc-André Moreau
ddf2519f1e Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
2015-06-26 08:27:22 -04:00
Bernhard Miklautz
7624519453 oss: fix formating 2015-06-22 19:45:56 +02:00
Bernhard Miklautz
77927c213e android: fix misc compiler warnings
with gcc version arm-linux-androideabi-gcc (GCC) 4.8
2015-06-22 19:09:59 +02:00
Martin Haimberger
156f86e487 hardend channel audin 2015-06-18 03:04:31 -07:00
ivan-83
1009268158 * debug and error messages now print function name and line number
* add debug messages to trace fake network dissconects
2015-05-27 22:57:10 +03:00
ivan-83
94a7abd2af + tsmf: OSS initial suppot (not work yet)
* tsmf: fix video playback on FreeBSD (proper shared object name)
* tsmf: renamed args: audio->sys, audio-dev->dev
* audin: OSS fix, now it work
* cmdline: add syntax help for /audin, /rdpsnd, /tsmf
* add debug messages
2015-05-27 22:54:13 +03:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Bryan Everly
a2a1d06d9b Necessary changes to get latest branch working on OpenBSD 5.6 2015-04-21 14:44:02 -04:00
Bernhard Miklautz
74c8400789 coding style fixes
Add missing space after if
2015-03-30 17:15:45 +02:00
Bernhard Miklautz
f469e069dc stream: Stream_Ensure*Capacity: change return type
Change the return type of Stream_Ensure*Capacity from void to BOOL to be
able to detect realloc problems easily. Otherwise the only way to detect
this was to check if the capacity after the call was >= the required
size.
In case Stream_Ensure*Capacity fails the old memory is still available
and need to freed outside.

This commit also adds checks to most calls of Stream_Ensure*Capacity to
check if the call was successful.
2015-03-30 16:33:48 +02:00
Bernhard Miklautz
f2b4709cbd opensl: remove unnecessary memset 2015-03-25 17:38:21 +01:00
Bernhard Miklautz
7f3326d41c Fix compiler warnings
gcc 4.7.2
* warning: value computed is not used [-Wunused-value]
* warning: unused variable ‘oss’ [-Wunused-variable]
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
ivan-83
3a8022e67c * audin OSS files 2015-03-13 01:41:44 +03:00
ivan-83
9e7e4ce7ff Merge branch 'master' of github.com:ivan-83/FreeRDP 2015-03-13 01:39:41 +03:00
ivan-83
7b3a552988 + audin OSS support (un tested now)
+ add: COMMAND_LINE_IGN_UNKNOWN_KEYWORD flag for CommandLineParseArgumentsA to ignory unknown keys without fail
+ add: lot of WLog_DBG() in drdynvc, add function names in existing
* change: error text in rdpsnd OSS
* fix: dev in rdpsnd does not work
* fix/change: audio-dev renamed to dev and now work in audin
* fix dynamic channels now work again
2015-03-13 01:28:44 +03:00
Zhang Zhaolong
d329831ba1 audin: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 11:10:28 +08:00
Armin Novak
5ce9c71a40 Prettiefied WLog messages. 2015-01-20 11:39:33 +01:00
Armin Novak
54ec26c758 Removed duplicated close call 2015-01-20 11:39:13 +01:00
Marc-André Moreau
6c2ebb2b58 channels: redirection valgrind fixes 2014-12-27 13:50:50 -05:00
Martin Fleisz
0be28ba0f6 Merge pull request #1965 from akallabeth/dynamic-addin-naming
Dynamic channel library naming
2014-10-31 13:42:16 +01:00
Marc-André Moreau
986f773ef7 channels/audin: fix version message 2014-10-23 20:40:45 -04:00
Armin Novak
059374457d Removed library prefix override. 2014-09-17 11:27:11 +02:00
Armin Novak
b1e9ffb655 Using wlog for channel logging now.
Fixed compiler warnings and broken callback in urbdrc.
2014-09-15 08:48:46 +02:00
Bernhard Miklautz
0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Armin Novak
66b8905ac6 Using special log defines for channels now. 2014-08-11 09:12:01 +02:00
Armin Novak
b97099e815 Replaced fprintf(stderr with DEBUG_WARN 2014-08-07 22:20:13 +02:00
Armin Novak
158e1323de Fixed compiler warnings. 2014-08-07 19:05:48 +02:00
Armin Novak
b252009d36 Replaced custom logging mechanism with WLog wrapper. 2014-08-07 16:51:49 +02:00
Vic Lee
29cb8680ce server: allow partial channel read (fix rdpsnd). 2014-07-14 20:00:38 +08:00
Armin Novak
15ce8c0552 Updated plugins to use new svc_plugin and OnDataReceived API. 2014-06-11 14:42:32 +02:00
Hardening
c076ffb020 Don't use NULL for pWrittenBytes when calling WTSVirtualChannelWrite()
Nothing in the MSDN API says that setting NULL is safe. And if the
implementation uses WriteFile directly, it crashes.
2014-05-28 17:04:24 +02:00
Marc-André Moreau
ee282a931b freerdp: fix build warnings on Windows 2014-05-10 09:50:36 -04:00
Hardening
ffd356031f Remove a warning 2014-04-29 10:39:07 +02:00
Hardening
9848314a5d More fixes in DSP 2014-04-29 10:32:16 +02:00
Bernhard Miklautz
1ba793b126 audin/client/alsa: fix installation path
The module was installed into the libdir instead of addin path.
2014-04-22 18:30:09 +02:00
Vic Lee
5391275f66 audin/server: fix server audio input channel. 2014-04-22 19:02:23 +08:00
Vic Lee
08b4976f72 Revert "channels: fix link errors."
This reverts commit 2fc7f9c485.
2014-04-22 15:05:53 +08:00
Vic Lee
8317fb9107 audin/server: fix a crash. 2014-04-21 18:13:12 +08:00
Vic Lee
2fc7f9c485 channels: fix link errors. 2014-04-21 17:47:12 +08:00
Marc-André Moreau
a7ab4bb4af channels/audin: fix target export 2014-03-12 11:36:50 -04:00
Marc-André Moreau
419e2936be Merge branch 'master' of github.com:awakecoding/FreeRDP into channels 2014-02-27 15:09:06 -05:00
Marc-André Moreau
951368a1ce Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-02-27 13:58:29 -05:00
Marc-André Moreau
6e1cdf1b67 libfreerdp-core: expose opaque HANDLE instead of WTSVirtualChannelManager* 2014-02-27 13:30:04 -05:00
Marc-André Moreau
9afddf66ad libfreerdp-core: implement WTSVirtualChannelOpenEx 2014-02-16 23:00:58 -05:00
Zhang Zhaolong
c9a9f5b438 wfreerdp: add winmm audin subsystem. 2014-02-11 17:39:03 +08:00
Marc-André Moreau
5ff847a6e6 wfreerdp: fix multiple warnings 2014-02-10 01:06:11 -05:00
Marc-André Moreau
1f18c27ec3 channels/audin: fix audin-server link libraries 2014-02-09 20:08:49 -05:00
Marc-André Moreau
37450da55d cmake: fix exporting of targets on pre-2.8.11 2013-10-29 14:47:40 -04:00