Commit Graph

884 Commits

Author SHA1 Message Date
Armin Novak
57958cb178 Fixed #3810: Renamed color functions 2017-11-24 13:21:43 +01:00
Armin Novak
8eaba5b002 Fixed mac server compilation. 2017-11-24 13:21:43 +01:00
Brent Collins
e21f9e359b Initialize SSL directly in the sample server, instead of relying on the SSL initialize logic
in the tls code as it was removed in a previous patch due to its redundancy.
2017-11-17 12:43:07 +01:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Sri Ramanujam
66c925c9e4 Fix libavcodec encoding errors and set tunables. 2017-11-09 11:39:54 -05:00
David Fort
504b771686
Merge pull request #4053 from akallabeth/ffmpeg_encoder
Implemented FFMPEG based encoder.
2017-11-06 11:25:48 +01:00
Mike Gabriel
dc075fb133 Fix warning in man pages
"warning: can't find macro file `www.tmac))'""`"
2017-08-03 08:41:50 +02:00
Armin Novak
8a0cec946b Added AVC420 in AVC444 shadow encoding 2017-08-02 09:42:04 +02: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
1d724e1343 Add 10.3 capability check. 2017-07-17 11:37:53 +02:00
Armin Novak
5764d5a78a Disable GFX H264 if no backend compiled in. 2017-07-17 09:25:21 +02:00
Norbert Federa
99a58ab20d Fixed sample server's wrong rfx pixel format 2017-07-10 11:31:42 +02:00
David Fort
93e5b0647a Merge pull request #4029 from realjiangms/fix_shadow_fragment_size
server/shadow: Fix incorrect bitmap fragment update.
2017-07-07 15:07:13 +02:00
zihao.jiang
2a65e70d08 server/shadow: Fix incorrect bitmap fragment update.
Legacy bitmap update might fail with 'fast path update size (xxxxx) exceeds the client's maximum request size (xxxxx)'
Original code might update last fragment with exceeded fragment size incorrectly. Fix the logic to prevent it.
2017-07-04 23:48:07 +08:00
Armin Novak
6142da9cb8 Fixed shadow server mouse wheel mapping on MacOS 2017-06-13 14:18:11 +02:00
Bernhard Miklautz
4d8d15ebf4 Merge pull request #3931 from hypherion2/master
Remove unused buffer in Mac shadow subsystem
2017-05-09 09:42:20 +02:00
akallabeth
9645123a53 Merge pull request #3930 from realjiangms/fix_shadow_thread_leak
server/shadow: close the thread handle so that it is detached because…
2017-05-03 15:39:40 +02:00
Ilya Shipitsin
d9a778ca50 resolve an issue identified by cppcheck:
[server/shadow/X11/x11_shadow.c:386] -> [server/shadow/X11/x11_shadow.c:390]: (warning) Either the condition '!subsystem' is redundant or there is possible null pointer dereference: subsystem.
[server/shadow/X11/x11_shadow.c:387] -> [server/shadow/X11/x11_shadow.c:390]: (warning) Either the condition '!subsystem' is redundant or there is possible null pointer dereference: subsystem.
2017-05-03 01:32:44 +05:00
Ilya Shipitsin
c78a2f0333 resolve issues identified by cppcheck
[channels/drive/client/drive_file.c:125]: (error) Memory leak: path_slash
[server/Windows/wf_dxgi.c:195]: (error) Invalid number of character '(' when these macros are defined: 'WITH_DXGI_1_2'.
2017-05-01 16:40:02 +05:00
Adrian A
7d2848ff74 Remove unused buffer which leaks
The buffer is not used in the code.
2017-04-28 15:24:59 -07:00
zihao.jiang
74db87a473 server/shadow: close the thread handle so that it is detached because no one is going to join it. Therefore the thread would release its resources automatically when exit 2017-04-11 22:12:01 +08: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
akallabeth
9fc9188770 Merge pull request #3794 from Abhineet-Ayan-Verma/patch-3
Added TAG macro definition
2017-02-21 12:44:33 +01:00
akallabeth
09e3d29f2b Merge pull request #3792 from Abhineet-Ayan-Verma/patch-1
Added TAG macro definition
2017-02-21 10:08:55 +01:00
Abhineet-Ayan-Verma
be1f22fad6 Added TAG macro definition
Fixed TAG undeclared identifier error
2017-02-21 10:16:17 +05:30
Abhineet-Ayan-Verma
f11ddb6ba6 Added TAG macro definition
Fixed TAG undeclared identifier error
2017-02-21 10:13:53 +05:30
Abhineet-Ayan-Verma
69fb77d5e9 Added TAG macro definition
Fixed TAG undeclared identifier error
2017-02-21 10:12:10 +05:30
akallabeth
b35224bcab Merge pull request #3788 from Abhineet-Ayan-Verma/patch-5
Added TAG definition
2017-02-20 15:58:29 +01:00
Abhineet-Ayan-Verma
8c1c4d253e Added TAG definition 2017-02-20 18:33:52 +05:30
Abhineet-Ayan-Verma
a66b0b3246 Update wf_update.c
+ TAG definition.
+ Required arguments to rfx_context_reset.
+ Replaced RDP_PIXEL_FORMAT_BGRA32 with PIXEL_FORMAT_BGRA32
2017-02-20 18:20:23 +05:30
akallabeth
3115c1e28d Merge pull request #3783 from chipitsine/master
fix several defects found by cppcheck
2017-02-20 13:07:12 +01:00
Martin Fleisz
c325ec5325 Merge pull request #3780 from akallabeth/win_compile_fix
Win compile fix
2017-02-17 13:22:51 +01:00
Ilya Shipitsin
0673bddf63 resolve trivial issues found by cppcheck
[server/shadow/X11/x11_shadow.c:511]: (error) Uninitialized variable: x
[server/shadow/X11/x11_shadow.c:512]: (error) Uninitialized variable: y
2017-02-17 17:21:18 +05:00
Armin Novak
f8d22c00d6 Fixed compiler warnings and uninitialized data. 2017-02-17 11:17:45 +01:00
Ilya Shipitsin
251727586d resolve a typo found by cppcheck
[server/Windows/wf_mirage.c:319]: (error) Invalid number of character '(' when these macros are defined: ''.
[server/Windows/wf_mirage.c:319]: (error) Invalid number of character '(' when these macros are defined: 'DFMIRAGE_LEAN'.
[server/Windows/wf_mirage.c:319]: (error) Invalid number of character '(' when these macros are defined: '_WIN64'.
2017-02-17 14:54:31 +05:00
Abhineet-Ayan-Verma
999cc22cdd Fixed undefined behavior in wf_peer_main_loop function
Undefined behavior on "wfPeerContext *context", as it is accessed before being initialized or assigned. Fixed.
2017-02-15 15:56:44 +05:30
Martin Fleisz
c2eacd3b31 Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00
Ilya Shipitsin
12f5368819 make cppcheck even more happier:
[channels/tsmf/client/gstreamer/tsmf_X11.c:317] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:322]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:470] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/tsmf_media.c:179] -> [channels/tsmf/client/tsmf_media.c:181]: (warning) Either the condition '!stream' is redundant or there is possible null pointer dereference: stream.
[client/Windows/wf_cliprdr.c:2219] -> [client/Windows/wf_cliprdr.c:2222]: (warning) Either the condition '!formatDataResponse' is redundant or there is possible null pointer dereference: formatDataResponse
[client/Windows/wf_cliprdr.c:2445] -> [client/Windows/wf_cliprdr.c:2448]: (warning) Either the condition '!fileContentsResponse' is redundant or there is possible null pointer dereference: fileContentsResponse.
[client/X11/xf_cliprdr.c:911] -> [client/X11/xf_cliprdr.c:913]: (warning) Either the condition '!clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/X11/xf_graphics.c:504] -> [client/X11/xf_graphics.c:506]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[libfreerdp/core/transport.c:861] -> [libfreerdp/core/transport.c:863]: (warning) Either the condition '!transport' is redundant or there is possible null pointer dereference: transport.
[server/shadow/shadow_server.c:777] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:778] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:779] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:781] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:782] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:783] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:784] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:785] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:787] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:789] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
2017-01-26 14:44:19 +05:00
Ilya Shipitsin
102913e808 make cppcheck a bit happier:
[channels/printer/client/printer_cups.c:103]: (error) Resource leak: fp
[server/Mac/mf_event.c:195]: (error) Memory leak: event_queue
[server/shadow/shadow_capture.c:233]: (error) Memory leak: capture
[winpr/libwinpr/sspi/test/TestSchannel.c:440]: (error) Memory leak: lpTokenIn
[winpr/libwinpr/thread/argv.c:198]: (error) Memory leak: lpEscapedChars
[winpr/libwinpr/utils/sam.c:312]: (error) Memory leak: entry
2017-01-25 17:09:25 +05:00
Bernhard Miklautz
f37e9a0adc Merge pull request #3664 from realjiangms/fix_gfx_ack
Server/shadow: Fix handling for gfx acknowledge according to spec
2017-01-23 13:49:25 +01:00
Bernhard Miklautz
2a6bac64ae Fix typos in man pages. 2017-01-17 13:25:47 +01:00
Bernhard Miklautz
d817469b78 Install man pages
* man pages are only build/installed if WITH_MANPAGES is enabled
* create a new cmake function install_freerdp_man to unified install man
  pages
* install all man pages using the new function
* update the nightly packages accordingly
2017-01-16 11:34:32 +01:00
Bernhard Miklautz
38e0bce772 shadow-cli: add initial man page 2017-01-16 11:11:59 +01:00
Bernhard Miklautz
d98f11705e shadow server: add more error messages 2017-01-16 11:11:59 +01:00
Bernhard Miklautz
bbb6bf6b43 Include major version number in library names
Currently it is not possible to cleanly install multiple major version
of FreeRDP concurrently as some of the development libraries (.so files)
files can conflict.

This change renames all libraries to include the major version number in
the library name to fix this limitation.

The list of changed libraries:

libwinpr-tools.so -> libwinpr-tools2.so
libwinpr.so -> libwinpr2.so
libfreerdp.so -> libfreerdp2.so
libfreerdp-client.so -> libfreerdp-client2.so
libfreerdp-shadow.so -> libfreerdp-shadow2.so
libfreerdp-server.so ->  libfreerdp-server2.so
libfreerdp-shadow-subsystem.so -> libfreerdp-shadow-subsystem2.so
libuwac.so -> libuwac0.so

As the library names have changed, projects that use FreeRDP will need to
update their dependencies. -
If pkg-config or cmake find modules are used, reconfiguration might be
sufficient.

Fixes #3460
2017-01-16 11:11:58 +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
zihao.jiang
25381a2984 Server/shadow: Fix handling for gfx acknowledge according to spec:
[MS-RDPEGFX]:
3.2.5.13  Processing an RDPGFX_FRAME_ACKNOWLEDGE_PDU message
If the queueDepth field is less than 0xFFFFFFFF, the server MUST expect that
RDPGFX_FRAME_ACKNOWLEDGE_PDU messages will continue to be sent by the client.
Furthermore, if the queueDepth field is in the range 0x00000001 to 0xFFFFFFFE the server SHOULD
use this value to determine how far the client is lagging in terms of graphics decoding and then
attempt to throttle the graphics frame rate accordingly.
If the queueDepth field is set to SUSPEND_FRAME_ACKNOWLEDGEMENT (0xFFFFFFFF), the server
MUST clear the Unacknowledged Frames (section 3.2.1.2) ADM element and MUST NOT expect any
further RDPGFX_FRAME_ACKNOWLEDGE_PDU messages from the client. In this mode, the server
MUST NOT wait or block on unacknowledged frames (as the
RDPGFX_FRAME_ACKNOWLEDGE_PDU message is not sent by the client) and MUST assume that
the client is able to decode graphics data at a rate faster than it is receiving frames.

On the other hand, RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU SHOULD only be used for informational and debugging
purposes and should not be taken into account.
2016-12-10 02:53:21 +08:00
Norbert Federa
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
zihao.jiang
ddc326d6d3 Fix server side code to be aware of rereadEvent 2016-10-27 23:43:09 +08:00
David Fort
043243f43c Merge pull request #3560 from akallabeth/gfx_10_2
Gfx 10.2 caps and deactivate GDI unsupported functions
2016-10-21 09:29:51 +02:00
akallabeth
a6f41176fc Merge pull request #3364 from hardening/limit_frames
Limit the time passed in transport check loop
2016-10-20 12:53:23 +02:00
Armin Novak
39b624a211 GFX: support 10.2 stack. 2016-10-16 10:42:46 +02:00
David Fort
f92860de87 Applied astyle formatting 2016-10-14 15:12:48 +02:00
David Fort
5b080359a9 sample-server: add a "local only" option to just listen on an UNIX socket
This makes things nicer for tests that don't need internet access.
2016-10-14 15:12:48 +02:00
Armin Novak
8ef1808191 Adjusted non X11 implementations. 2016-10-14 12:50:04 +02:00
Armin Novak
9c50e1a635 Replaced _VF formats with copy flags. 2016-10-14 10:36:52 +02:00
akallabeth
9adc13297b Merge pull request #3497 from realjiangms/fix_gfx_win10
server/shadow: Fix black screen with win10 mstsc
2016-10-14 10:12:27 +02:00
zihao.jiang
3fb92ae2ec server/shadow: Fix black screen with win10
Request full screen update on RDPGFX_CAPS_ADVERTISE_PDU. Win10 client seems to clean the screen after gfx channel opened. If there happens to be no screen update from server, we will get black screen in mstsc client.
2016-10-11 13:25:07 +08:00
Armin Novak
cf2ec62d59 Reformatted file. 2016-10-10 12:10:29 +02:00
Armin Novak
bc39f28a95 Fixed regression from rebase. 2016-10-10 12:07:27 +02:00
Armin Novak
649d270ccd Fixed GDI_RGN->null initialization. 2016-10-06 13:43:15 +02:00
Armin Novak
2db04736ac Fixed memory leak. 2016-10-06 13:43:15 +02:00
Armin Novak
9a1c60885c Unified RFX server color format. 2016-10-06 13:43:15 +02:00
Armin Novak
9ab04711fa Fixed shadow server color encoding. 2016-10-06 13:43:12 +02:00
Armin Novak
f2bb83e28d Fixed rebase related issues. 2016-10-06 13:43:11 +02:00
Armin Novak
22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak
44b8756617 Warning fixes. 2016-10-06 13:43:10 +02:00
Armin Novak
35bf9e6731 Fixed missing mac server symbols. 2016-10-06 13:43:10 +02:00
Armin Novak
0c551808a3 Fixed gdi_init for windows server. 2016-10-06 13:43:09 +02:00
Armin Novak
d35823cf69 Moved channel init code to core library. 2016-10-06 13:43:09 +02:00
Armin Novak
016f3a408b xxx. 2016-10-06 13:42:59 +02:00
Armin Novak
df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
zihao.jiang
2c00240a17 server/shadow: Fix regression with rdp8.0
Shadow server crash with rdp8.0 with gfx enabled.
Root Cause: rdp8.0 is not support in shadow gfx and rdpgfx_caps_advertise returns an error. However setChannelError crashs because context->errorDescription is NULL
1. Fix shadow gfx to handle rdp8.0
2. Initialize context->errorDescription for server side new-context
2016-08-29 02:50:09 +08:00
zihao.jiang
92ca9851d2 rdpgfx/server: Fix for windows10 clients
1. Fix order of gfx reset and new-surface. Windows10 client will show black screen with this issue(FreeRDP itself is dramatically immune to this issue)
2. Handle RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU for FPS control
2016-08-21 01:59:40 +08:00
zihao.jiang
5d4e9a2c87 rdpgfx/server: More minor fix 2016-08-20 01:36:37 +08:00
zihao.jiang
a15b8fff66 rdpgfx/server: Minor fix: allow configurable codec parameter 2016-08-07 20:15:39 +08:00
zihao.jiang
2b6bd2626d rdpgfx: various fixes according to comments
1. Fix stream leak in rdpgfx
2. Make src data const in zgfx. Harden zgfx to be independent to byte order
3. Fix written bytes return value in channel write
4. Add check for return value in shadow_client.c
5. Add gfx callback to send surface command with frame marker pdu.
6. Check remain length for recv subroutine
7. Fix compile errors
2016-08-07 20:15:39 +08:00
zihao.jiang
746a754244 rdpgfx: Implementation for server side channel
server/shadow: support h264 codec with gfx channel
2016-08-07 20:14:33 +08:00
Marc-André Moreau
14cb6d33c6 freerdp: make modifications to NLA server-side fixes according to PR comments 2016-07-22 09:06:07 -04:00
Marc-André Moreau
801dc0f826 freerdp: add configurable NTLM SAM file option for server-side NLA 2016-07-21 18:58:24 -04:00
Marc-André Moreau
1ffbd774e9 freerdp: fix sending of TLS alert on NLA failure, add better handling of server-side NLA in shadow server 2016-07-21 17:53:20 -04:00
Bernhard Miklautz
9daf129c63 Merge pull request #3371 from realjiangms/fix_x11_shadow_race
Server/shadow: Protect X operations on shared subystem X11 display with X11 display lock
2016-05-30 19:25:20 +02:00
zihao.jiang
42279834bb Server/shadow: Protect X operations on shared subystem X11 display with X11 display lock 2016-05-26 00:20:37 +08:00
Bernhard Miklautz
17c125d986 Merge pull request #3369 from realjiangms/fix_mouseback_2796
Server/shadow: Fix issue 2796. Mouse cursor draw back issue
2016-05-25 17:25:07 +02:00
zihao.jiang
9f4465ebbc Server/shadow: Fix issue 2796. Mouse cursor draw back issue 2016-05-25 23:08:36 +08:00
akallabeth
cf127ebfb9 Merge pull request #3357 from realjiangms/fix_rdpsnd_race
shadow/rdpsnd: Fix race condition in rdpsnd channel server.
2016-05-23 16:21:49 +02:00
zihao.jiang
444b678e71 shadow/rdpsnd: Fix race condition in rdpsnd channel server. The output buffer and format parameters are not protected. This cause some data inconsistence if rdpsnd has own thread 2016-05-22 22:13:32 +08:00
rinov
c42edd9260 Update mf_mountain_lion.c
Remove duplicate return statement in mf_mlion_stop_getting_screen_updates()
This change is no impact anywhere.
2016-05-20 01:17:49 +09:00
Armin Novak
eacf2b542e Fixed memory leaks. 2016-05-12 10:01:30 +02:00
Bernhard Miklautz
59fbfdb24b Add library libwinpr-tools
libwinpr-tools is a replacement for winpr-makecert-tool.a. Currently
it's basically the same as winpr-makecert-tool.a but in future
functionality that doesn't fit directly in winpr will be added here.
2016-05-03 14:42:08 +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
Bernhard Miklautz
9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Armin Novak
36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
Martin Fleisz
66ae3f2c77 Merge pull request #3177 from akallabeth/codec_reset_fix
Fixed codec reset, now resetting resolution too.
2016-03-11 11:22:59 +01:00
Norbert Federa
ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
Jakub Adam
9f0b14f8bd shadow/subsystem: fix pkgconfig file
Add freerdp-shadow-subsystem to 'libs' in order to avoid undefined
reference to shadow_subsystem_set_entry_builtin at runtime.

Remove cyclic dependency on itself.
2016-03-02 14:58:12 +01:00
Armin Novak
ce8f3f2539 Fixed context reset of sample server. 2016-03-02 14:46:33 +01:00
Armin Novak
09e957f717 Fixed broken check. 2016-03-02 14:46:33 +01:00
Armin Novak
2e110c7f35 Fixed codec reset, now resetting resolution too.
H264 and others require the surface resolution to work properly.
This initializes the codecs and the resolution on reset.
2016-03-02 14:46:33 +01:00