Commit Graph

1274 Commits

Author SHA1 Message Date
Kobi Mizrachi
ab3a096353 server: proxy: fix race condition when between client thread and server update thread 2020-01-15 11:23:14 +02:00
Kobi Mizrachi
15909af766 server: proxy: fix pf_modules_init 2020-01-14 10:40:49 +01:00
David Fort
0cc3af2282
Merge pull request #5796 from akallabeth/rdp_10_7_large_pointers
Added RDP 10.7 large pointer support
2020-01-14 10:17:13 +01:00
Kobi Mizrachi
e3728c1822 server: proxy: do not compile modules by default 2020-01-14 07:58:47 +01:00
Kobi Mizrachi
706e13c312 server: proxy: shutdown gracefully 2020-01-14 07:58:47 +01:00
Kobi Mizrachi
b2fad50cd3 server: proxy: rewrite modules API
* Add support for C++ plugins.
* Seperate between a "module" and a "plugin": a module is a shared
library that exposes a function called "proxy_module_entry_point". This
function gets a parameter to `proxyPluginsManager*`, which can be used to
register plugins.
* Refine the API of the modules infrastructure:
 * use proxyData* instead of rdpContext* when firing a hook or calling a filter.
 * use clearer names.
* Instead of having to specify a path for each module to be loaded in
the configuration, the proxy now loads modules from specificed
directory, using the CMAKE variable PROXY_PLUGINDIR.
* Add an option to specify required plugins: plugins that the proxy
wouldn't start without having them fully loaded.
2020-01-14 07:58:47 +01:00
Kobi Mizrachi
29dee84a2b rail/server: rename rdpContext to rdpcontext
Fixes a compilation error when mixing c++ and c code.
2020-01-14 07:58:47 +01:00
Kobi Mizrachi
47ca28b5c3 server: proxy: fix leak in pf_context_copy_settings 2020-01-13 13:41:44 +01:00
Kobi Mizrachi
ca2e578acc server: proxy: add a unique id to each session and improve logs 2020-01-08 11:59:34 +01:00
Kobi Mizrachi
ab3a72f825 server: proxy: move peer initialization to seperate function 2020-01-08 11:59:34 +01:00
Kobi Mizrachi
77ca7ac2ad server: proxy: make fallback to tls configurable 2020-01-08 07:58:03 +01:00
David Fort
31a4e2ad8b
Merge pull request #5745 from akallabeth/urbdrc_rewrite
Urbdrc rewrite
2020-01-06 09:23:45 +01:00
Armin Novak
182d0ce548 Added RDP 10.7 large pointer support
* Implements [MS-RDPBCGR] version 51 large pointer support.
* Logs unknown large pointer capability flags as warning.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 09:53:40 +01:00
Kobi Mizrachi
2e1d719ab1 server: proxy: proxy keyboard leds and imei 2019-12-17 15:33:11 +01:00
Bernhard Miklautz
814771eed5
Merge pull request #5778 from akallabeth/shadow_warnings
Added warning to win shadow server
2019-12-16 09:57:16 +01:00
Mati Shabtay
97606edeee proxy: Implement RAIL support in proxy 2019-12-12 11:10:44 +01:00
Armin Novak
e6ff9e3efa Added warning to win shadow server
Currently the windows shadow server does not support authentication.
Log that fact so everyone using it is notified on each login.
2019-12-12 09:20:30 +01:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak
15ad496bba Cleaned up server sample audin channel use. 2019-11-22 10:56:21 +01:00
kubistika
09648834a0 server: proxy: fix sync issue in gfx opening 2019-11-12 12:45:01 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Martin Fleisz
bc39b32d20
Merge pull request #5685 from akallabeth/multi_instance_arg_parse
COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
2019-11-06 09:09:22 +01:00
Martin Fleisz
5b6663fe3a
Merge pull request #5689 from akallabeth/cleanups
Cleanups
2019-11-05 15:28:02 +01:00
akallabeth
acad36465d Fix #5693: Add missing link to gfx client channel library 2019-11-02 09:57:03 +01:00
kubistika
59ba044ccd server: proxy: client: always do NLA fallback 2019-10-31 11:26:13 +02:00
Armin Novak
f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
kubistika
d5245e1263 server: proxy: export config utils functions to be used by modules 2019-10-28 13:31:10 +01:00
kubistika
160446e093 server: proxy: stop loading session captures config if it is disabled 2019-10-28 13:31:10 +01:00
Armin Novak
10ce60ade1 Use COMMAND_LINE_ARGUMENT_A copy also in shadow server code. 2019-10-28 13:30:05 +01:00
Armin Novak
0c87eaee4d COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
Remove the old global structs as the parser modifies them. When using
multiple instances in the same process space this could break parsing.
2019-10-28 13:30:05 +01:00
kubistika
ab2b288f87 server: proxy: refactor config loader 2019-10-24 12:57:48 +02:00
kubistika
d92485899d server: proxy: capture: refactor path creation 2019-10-24 12:19:31 +02:00
kubistika
c723980a2f server: proxy: add python script to create a video from session frames 2019-10-24 12:19:31 +02:00
kubistika
16d4d46da6 server: proxy: implement session capture feature 2019-10-24 12:19:31 +02:00
kubistika
5e09ac9a7a server: proxy: client use PIXEL_FORMAT_BGRA32 (easier to write frames to bitmap) 2019-10-24 12:19:31 +02:00
kubistika
40463bb2f2 server: proxy: client: terminate the connection if pre connect hook fails 2019-10-22 10:16:17 +02:00
Martin Fleisz
5ead938271
Merge pull request #5657 from akallabeth/warning_fixes2
Warning fixes2
2019-10-17 17:00:57 +02:00
Martin Fleisz
105527ed37
Merge pull request #5648 from akallabeth/h264_dyn
H264 runtime detection
2019-10-17 12:54:43 +02:00
Armin Novak
59b4988f56 Fixed compilation warnings. 2019-10-16 14:54:05 +02:00
Martin Fleisz
799685cb92
Merge pull request #5646 from akallabeth/realloc_fixes
Fixed #5645: realloc return handling
2019-10-07 10:43:11 +02:00
Armin Novak
27c6ad6ebf Let shadow server detect H264 support at runtime 2019-10-07 09:47:03 +02:00
Armin Novak
ea492ed6b0 Fixed windows shadow server startup issue. 2019-10-04 17:13:00 +02:00
Armin Novak
19e4eb5d09 Added /buildconfig command line for shadow. 2019-10-04 16:19:23 +02:00
Armin Novak
e09f739b90 Cleaned up NSC API 2019-10-04 10:33:41 +02:00
kubistika
f4d169fb75 server: proxy: register input and update callbacks in post connect
To avoid a race in which the server received an input event before
proxy's client is initialized, we now only register input and update
callbacks after client is initialized and safe to use.
2019-09-30 10:08:28 +02:00
kubistika
4d175f6008 server: proxy: refactor pf_context_create_client_context 2019-09-30 10:08:28 +02:00
kubistika
b6730ea31e server: proxy: support auto reconnect 2019-09-30 10:08:28 +02:00
kubistika
32913850d5 server: proxy: separate client and server security settings 2019-09-30 10:07:43 +02:00
Bernhard Miklautz
02a65840e8
Merge pull request #5578 from kubistika/proxy/refactor
sever: proxy: code refactor
2019-09-19 10:55:08 +02:00
kubistika
53a92421b1 server: proxy: config: fix mem leak 2019-09-11 14:29:04 +03:00
Armin Novak
8c17d2fa41 Add MOUSEEVENTF_HWHEEL define if not found in windows.h 2019-09-10 09:35:32 +02:00
Armin Novak
b1d42b17f6 Fix windows shadow server issues reported in #5577 2019-09-10 09:18:55 +02:00
kubistika
867843eef7 server: proxy: client: only try NLA if credentials available 2019-09-10 10:11:00 +03:00
kubistika
a87065ed67 server: proxy: get rid of unnecessary casts 2019-09-09 17:42:18 +03:00
kubistika
0b340b784c server: proxy: drop local unix socket listen option 2019-09-09 17:42:18 +03:00
kubistika
8a75e8f54e server: proxy: refactor 2019-09-09 17:42:18 +03:00
kubistika
f5d32f4617 server: proxy: refactor usage of pf_context_copy_settings 2019-09-09 17:35:07 +03:00
kubistika
7ed39ce724 server: proxy: make sure module's pre connect only called once 2019-09-08 15:08:15 +03:00
kubistika
8cf8da3e41 server: proxy: config: remove duplicate declaration of config macros 2019-09-08 15:06:22 +03:00
Martin Fleisz
c90b7a9714
Merge pull request #5563 from akallabeth/scanbuild_fixes
Scanbuild fixes
2019-09-03 10:57:24 +02:00
kubistika
62b32fbab9 server: proxy: only wait for server dynvc when needed 2019-09-03 09:09:27 +02:00
Armin Novak
4ff24d074b Fixed memory leak in error branch 2019-09-03 08:56:36 +02:00
kubistika
e135106731 server: proxy: rdpsnd support 2019-08-29 14:39:17 +02:00
kubistika
dc11bcc9f0 server: proxy: fix nla fallback (introuduced in #5522) 2019-08-28 17:03:40 +02:00
kubistika
067b7dfd1c server: proxy: disp: fix copyright 2019-08-23 11:58:08 +02:00
kubistika
04e1708df1 server: proxy: use new hooks api 2019-08-23 11:58:08 +02:00
kubistika
32fff644da server: proxy: improve modules api 2019-08-23 11:58:08 +02:00
kubistika
d1c5862f54 server: proxy: sync cliprdr opening 2019-08-19 17:03:13 +02:00
kubistika
0ad87d98ca server: proxy: load proxy clipboard config 2019-08-19 09:30:40 +02:00
kubistika
7dc70b86d6 server: proxy: cliprdr support 2019-08-19 09:30:40 +02:00
kubistika
ef306fbff6 server: proxy: pf_context.c: Fix nla crash
Because the proxy uses freerdp_settings_copy to do re-negotiation after
first connection to remote server, all redirection information
(RedirectionPassword, RedirectionDomain, etc.) pointers were duplicated
(to both client and server settings structs). Then, at disconnection, a
double-free occured.
2019-08-14 19:39:34 +02:00
Martin Fleisz
e16d559f70
Merge pull request #5517 from akallabeth/winmm_latency
Added proper latency estimation for winmm sound backend.
2019-08-14 12:48:21 +02:00
kubistika
ddb811cbc8 server: proxy: client: before loading client addins, wait for serve's dynvc to be in ready state 2019-08-13 16:28:05 +02:00
kubistika
1da91444c0 server: proxy: client: set glyph support level to NONE 2019-08-13 16:28:05 +02:00
Armin Novak
ddb209445a Fix server compile against _WIN32_WINNT=0x601 2019-08-13 10:55:12 +02:00
kubistika
cb833ed45c server: proxy: print configuration on startup 2019-08-05 11:01:31 +03:00
kubistika
595f23b8fe server: proxy: channels: only open allowed channels 2019-08-05 11:01:31 +03:00
kubistika
0b6864a273 server: proxy: filters: demo: log instead of dropping the connection 2019-08-05 11:01:31 +03:00
kubistika
c5e6e0ba31 server: proxy: filters: make sure filter_init is exported in filters compilation 2019-08-05 11:01:31 +03:00
kubistika
31cd7b844f server: proxy: refactor configuration loader 2019-08-05 10:54:07 +03:00
kubistika
3051a4b4b4 server: proxy: ensure client termination 2019-08-02 10:17:45 +02:00
kubistika
038c933f98 server: proxy: sync server and client channels
when disconnections/redirections occured, sometimes server/client
channels were not synced, meaning that for example the gfx server
received a message, then tried to use gfx client that was already freed.
2019-08-02 10:17:45 +02:00
kubistika
a9758a8c0c server: proxy: fix rdpgfx close race 2019-07-30 09:56:06 +02:00
kubistika
908d6ebe1e server: proxy: Add logs, call client->Close to send disconnection ultimatum 2019-07-16 16:20:06 +03:00
kubistika
d0065ee9a1 server: proxy: remove unnecessary function handle_client_disconnection 2019-07-16 16:20:06 +03:00
kubistika
b12ee3288c server: proxy: adjust log levels 2019-07-16 16:20:06 +03:00
kubistika
95851b25e7 server: proxy: set nla fallback flag flag only if NLASecurity is enabled 2019-07-16 16:20:06 +03:00
kubistika
e9e1c5d748 server: proxy: naming refactor 2019-07-16 16:20:06 +03:00
kubistika
70ca028453 server: proxy: remove unnecessary files 2019-07-16 16:12:12 +03:00
kubistika
1b4371ed22 server: proxy: use freerdp_settings_copy 2019-07-16 13:47:35 +02:00
kubistika
ab00d90f03 server: proxy: implement NLA fallback 2019-07-15 11:52:30 +02:00
kubistika
02a65b8867 Declare support for multimon in proxy server.
It was broken in the DISP PR.
2019-07-08 11:09:29 +03:00
kubistika
8954e1646b server/proxy: Add check after calling p_client_context_create 2019-06-26 14:25:07 +02:00
kubistika
8fbee28dd7 server/proxy: Logging and comments improvements 2019-06-26 14:25:07 +02:00
kubistika
fb3f7f3908 server/proxy: pf_update: Update ps->settings in DesktopResize 2019-06-26 14:25:07 +02:00
kubistika
74a66f6651 server/proxy: set ps->thread to NULL on disconnect
freerdp_abort_connect calls the proxy's client stop function,
that closes the thread handle. if it already closed by the server,
a segfault will occur because CloseHandle will try to access free()'ed
memory.
2019-06-26 14:25:07 +02:00
kubistika
8a115f2020 server/proxy: Refactor pdata_set_connection_info
Connection info must be set after the proxy's client connection
established, because if the client didn't provide credentials in .rdp
file, we don't know its username yet.
2019-06-26 14:25:07 +02:00
kubistika
98973dd0da server/proxy: pf_filters: Update filter_free to accept NULL 2019-06-26 14:25:07 +02:00
kubistika
f795fc2670 server/proxy: Fix race-condition
The client's `ClientStop` callback wasn't set, therefore calling
freerdp_client_stop wasn't really blocking until it has stopped, and a
race condition occured. Fixed by registring to `ClientStop` callback and
waiting for the client thread to finish.
2019-06-26 14:25:07 +02:00
kubistika
255fab201a server/proxy: Fix rdpgfx and events leak 2019-06-26 14:25:07 +02:00
kubistika
c0cece1064 server/proxy: Fix double-call to disconnect 2019-06-26 14:25:07 +02:00
David Fort
2da425aa03
Merge pull request #5424 from kubistika/rdpgfx
rdpgfx: CacheImportOffer implementation
2019-06-13 11:35:15 +02:00
David Fort
1f128b6142
Merge pull request #5423 from kubistika/feat/bitmap-auto-flag-calculate
rdpUpdate: add autoBitmapDataCalculate
2019-06-12 21:15:59 +02:00
Kobi
d9366df448 RDPEDISP server side implementation (#5414)
* libfreerdp: Add RDPEDISP server implementation

* server/proxy: Add RDPEDISP support
2019-06-11 16:13:42 +02:00
kubistika
896ba119d1 server/proxy: Proxy CacheImportOffer & QoeFrameAck 2019-06-06 07:53:34 +03:00
kubistika
c8b38fb66e server/proxy: Fix bitmap update crash when target is win7 2019-06-04 17:33:48 +03:00
David Fort
5d1fc68629
Merge pull request #5405 from m4ntis/proxy/filters-api
Proxy: Filters API
2019-06-03 15:45:24 +02:00
kubistika
6224109a1d server/proxy: Add multimon support 2019-06-03 14:33:15 +03:00
kubistika
cd135ceacb libfreerdp/core: Export monitor layout PDU
* Move update notification related functions to new display.c: Not
related to `rdp.c`.
    * Rename `rdp_write_monitor_layout_pdu` to `display_write_monitor_layout_pdu`.
* Add internal `display_convert_rdp_monitor_to_monitor_def` instead of
doing the conversion inside `display_write_monitor_layout_pdu`.
2019-06-03 14:30:17 +03:00
kubistika
340d877cce server/proxy: Proxy pointer updates
* Moved update callbacks of client to pf_update.h
2019-05-29 10:06:18 +03:00
kubistika
72952c679f fix vs2010 errors 2019-05-28 09:30:39 +03:00
kubistika
52e4baa949 server/proxy: Code refactor 2019-05-28 09:30:38 +03:00
kubistika
aa262d341d server/proxy: Use winpr library in proxy/filters 2019-05-26 15:32:49 +03:00
kubistika
7477ac19a7 server/proxy: Fix free invalid memory when pf_server_parse_target_from_routing_token fails 2019-05-26 10:48:10 +03:00
kubistika
76012fb5d6 server/proxy: Fix mem leak in pf_server_parse_target_from_routing_token 2019-05-26 10:48:10 +03:00
kubistika
20e503421e server/proxy: Remove unnecessary wrap for connection info 2019-05-26 10:48:10 +03:00
kubistika
2126024321 server/proxy: Add docs in filters_api.h 2019-05-26 10:48:10 +03:00
kubistika
8e642c9d00 server/proxy: Add return statement in demo_filter.c 2019-05-26 10:48:10 +03:00
kubistika
98f698cf2b Add README for filters API 2019-05-26 10:48:10 +03:00
kubistika
7237624b37 bugfix: segfault when calling an event which is not implemented by filter 2019-05-26 10:48:10 +03:00
kubistika
96616bb18c server/proxy: Use new parse_string_array_from_str implementation (using ArrayList) 2019-05-26 10:48:10 +03:00
kubistika
3a750810f7 server/proxy: Refactor pf_server.c 2019-05-26 10:48:10 +03:00
kubistika
c4d72c6ad2 server/proxy: Refactor pf_server_parse_target_from_routing_token 2019-05-26 10:48:10 +03:00
kubistika
a39658fc2a server/proxy: Add external filters support 2019-05-26 10:48:10 +03:00
kubistika
6bb5a1d579 server/proxy: Proxy errors back to client 2019-05-19 14:42:27 +03:00
Mati Shabtay
b907324009 First version of an RDP proxy (#5372)
* server: Add proxy dir with barebones server

* sever/proxy: Remove licensing

* server/proxy: Add client files

* server/proxy: rm binary

* server/proxy: Formatting

* server/proxy: Fixed includes and added basic client creation functionality

* server/proxy: Remove licensing and fix ifndef

* proxy/server: Fix cmake indentation

* server/proxy: Fix licensing

* server/proxy: Forward connection on peer_post_connect

* server/proxy: Fix function signature

* server/proxy: Changed function signature of proxy_client_start

* server/proxy: Now peer_post_connect calls proxy_client_start in a new thread

* pfreerdp.c: Clean up useless comments and logs

* server/proxy: Fix license

* server/proxy: Remove all non-connection related data from proxy_context

* server/proxy: Move Log Tag definition to pf_log.h

* server/proxy: Move context definition to pf_context

* server/proxy: Delete pfreerdp.h

* pfreerdp.c: Move context callbacks to pf_context.c

* server/proxy: Update CMakeLists.txt

* pf_channels: Use new proxy context API

* pf_client: Move context to pf_context

* pf_client.c: Remove unnessecary event handling

* server/proxy: Formatting

* proxy/server: Move server logic to pf_server.c

* server/proxy: Handle client disconnection

* Merge stash

* pf_server.c: Open GFX Connection to client

* server: CMakeLists: build proxy along with other servers

* server: proxy: get target server from rdpNego->RoutingToken

Iv'e omitted a check from  which im not sure is right. Should check in docs

* server/proxy: Handle remote server -> client disconnection

* server/proxy: Move common function  to pf_common.c

* server/proxy: Move common function  to pf_common.c

* rdpgfx.h: Add reference to freerdp.h for rdpContext

* pf_channels: Pipe GFX on channel connection

* server/proxy: Add pf_rdpgfx for proxy gfx callbacks

* pf_client: Declare dynvc and gfx capabilities on connection

* server/proxy: Add graphics callbacks

* server/proxy: Add graphics callbacks

* pf_server: Listen to channel events

* Pass user settings to server

* pf_server: Proxy mouse events

* fixup! server/proxy: Add graphics callbacks

* pf_client: Fix setting initialization

* Merge feat/proxy-gfx to feat/proxy

* pf_server: Fix double freed credentials

* server/proxy: Remove unnecessary call to freerdp_client_settings_parse_command_line

* server/proxy: Refactor re-activation code

* server/proxy: Run format scripts

* server/proxy: Fix segfault when post_disconnect return FALSE

* server/proxy: Refactor proxy_settings_mirror

* server/proxy: Redirect credentials

* server/proxy: move proxy_settings_mirror to pf_common.c

* server/proxy: Redirect desktop_resize event

* pf_client: Remove interactive CLI auth methods

* fixup! server/proxy: Redirect credentials

* server/proxy: Rename proxy_mirror_settings to pf_common_copy_settings

* pf_server.c: Fixed non-freed context

When the disconnection is forced by the target server, the function
`pf_server_handle_client_disconnection` isn't called. Therefore, the
context of the connection between the proxy to tagrget isn't freed.

* fixup! pf_server.c: Fixed non-freed context

* pf_client: Prefix all client methods with pf_client

* pf_context: Add init client to proxy context method

* pf_server: Confirm all GFX caps regardless of settings

* pf_server: Prefix all methods with pf_server

* pf_server: Move variable decleration to start of method

* pf_server: Fix client setting

* pf_server: Fix GFX init method

* pf_server: Move variable decleration to start of methods

* server/proxy: Formatting

* Merge feat/proxy

* pf_server: Proxy synchronize event

* pf_server: Proxy refresh rect update events

* pf_server: Proxy suppress output messages

* server/proxy: Fix licensing

* server/proxy: Move client input callbacks to pf_input

* server/proxy: Move client update callbacks to pf_update

* server/proxy: Fix non-terminated target host string

* Feat/proxy config (#2)

* server/proxy: Add config loading support

* server/proxy: Add config file

* server/proxy: Format code

* server/proxy: Code refactor, rename update_register_callbacks and input_register_callbacks

* server/proxy: Update config file

* server/proxy: Remove config.ini from root directory

* Remove comment from config file

* server/proxy: Fix leak in pf_server_load_config

* server/proxy: Add rdpServerProxy struct and embed it in proxyContext

* server/proxy: Load configuration and pass it inside every proxyContext instance

* server/proxy: Move rdpProxyServer to proxy.h

* server/proxy: Use configuration while proxying input events

* server/proxy: Update CMakeLists

* server/proxy: Refactor pf_input.c

* server/proxy: Add AllowedChannels, DeniedChannels in configuration

* server/proxy: Remove unnecessary variable from parse_channels_from_str

* server/proxy: Update config file

* server/proxy: config: Rename  to

* server/proxy: config: Add mode - blacklist/whitelist

* server/proxy: Refactor, fix NULL deref

* server/proxy: Add license to proxy.h

* server/proxy: Fix newline in pf_config.c

* server/proxy: config: Rename Mode to WhitelistMode

* Add target in config. Add checks for configuration validity (#3)

* Add target in config. Add checks for configuration validity

* Update config file

* libfreerdp: nego: revert commented out check of routingToken length

* pf_server: Fix target host info from RoutingToken

* pf_server: Remove hardcoded lenght of routing token prefix

* Feat/refactor context (#8)

* Refactor main structs

* Update CMakeLists.txt

* pf_server.c: Free pdata at the end of the connection

* Run format scripts

* Rename tf to pc

* Fix licenses

* pf_server: Refactor names of structs and functions

* proxy: gfx: sync caps (#4)

* proxy: gfx: sync caps

* proxy: gfx: sync caps, hook gfx client's OnClose() call and close server resources

* fixup! Feat/refactor context (#8)

* fixup! fixup! Feat/refactor context (#8)

* rdpgfx/client: Fix rdpgfx_recv_caps_confirm_pdu caps set length parsing

* Run format scripts

* proxy config.ini: Change default port to 3389

* pf_rdpgfx: Limit caps version to freerdp's supported versions

* Gfx OnOpen() wait for dynvc ready (#10)

* proxy/gfx: Wait for dynvc ready state before open

* pf_channels: Initialize pc->gfx

* pf_rdpgfx: Add log and fix comments

* rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec

* pf_rdpgfx: Proxy rdpgfx v10.6 PDUs

* gfx client: Publish FrameAck sending and add auto ack flag

* proxy/gfx: Forward frame ack messages

* pf_context: Forward domain on connection

* pf_rdpgfx: Change max supported caps to 10.6

* proxy: Update config

* server/proxy: Use configuration in pf_server_handle_client

* rdpgfx/client: Fix size of surface_to_scaled_window, surface_to_window

* pf_rdpgfx: Fix formatting

* pf_server.c: Fix comments

* Move pf_server_rdpgfx_init to pf_rdpgfx

* server/proxy/CMakeLists.txt: Fix formatting

* pf_client.c: Add comment in proxy_server_reactivate

* Fixed const correctness of gfx function pointer

Signed-off-by: Mati Shabtay <matishabtay@gmail.com>

* server: proxy: update copyright

* server: proxy: wrap rdpNego and add a getter for routing token

* Refactor routing token getter (#14)

* Refactor routing token getter

* pf_server_parse_target_from_routing_token change routing_token_length to be DWORD

* libfreerdp/core/nego.c: Run format script

* pf_server: Run format script

* server/proxy: Fix os msbuild tests

* pf_channels.c: Remove unused channels

* pf_client: Remove unused callbacks

* proxy: Remove encomsp callbacks from proxy's client

* client/rdpgfx_main.c: Fix msbuild test

* pf_config.c: Use StrSep instead of strsep for Windows builds

* Removed nego struct from direct access.

Signed-off-by: Mati Shabtay <matishabtay@gmail.com>

* proxy: Rename binary to freerdp-proxy

* rdpgfx_main.c: Revert unwanted double change to send_supported_caps

* Cleaned up proxy server code.

* All internal functions static
* Added simple command line argument to supply a config file
* Silence compiler warnings

Signed-off-by: kubistika <kmizrachi18@gmail.com>
2019-05-17 14:32:54 +02:00
Armin Novak
93bf375686 Refactored settings getter/setter to stay compatible. 2019-05-08 14:35:25 +02:00
Armin Novak
d7ca2db62e Fixed doulbe semicolon in C files. 2019-05-08 12:58:01 +02:00
Armin Novak
7b2608a938 Added gfx capability filter option.
With this new option it is possible to selectively disable certain
GFX capability versions. This way buggy behaviour can be addressed
at runtime.
2019-05-08 11:43:22 +02:00
Armin Novak
3b7e46fb0e Updated GFX to 10.6 spec 2019-05-07 12:10:13 +02:00
Armin Novak
841cb70f91 Fixed const correctness of gfx function pointer
Signed-off-by: Mati Shabtay <matishabtay@gmail.com>
2019-05-05 16:17:15 +03:00
Armin Novak
27d2a9e040 Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak
e76b5d442b Silenced unused parameter warnings, added log messages. 2019-04-05 09:14:35 +02:00
Armin Novak
8b5ef6f41f Silenced unused parameter warnings, added log messages. 2019-04-05 09:14:35 +02:00
Armin Novak
f4de82c242 Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
e8c8e7b6d0 Updated EGFX support to 10.6 2019-02-27 16:36:15 +01:00
Armin Novak
53b018bfef Fix callback function return types. 2018-12-04 09:34:22 +01:00
Armin Novak
edd6d49f23 Fix #4909: Do not initialize HOME environment variable as it is no longer used.
GetKnownPath does not require this environment variable to be
available for windows builds.
2018-11-29 13:44:21 +01:00
Armin Novak
c8908c8be6 Updated windows shadow server assistance usage. 2018-11-22 11:11:31 +01:00
Armin Novak
26b83ea74e Reenabled and fixed windows server compile. 2018-11-15 09:01:53 +01:00
Armin Novak
02f68c35b9 Fixed -Wextra sign warnings 2018-10-24 13:25:31 +02:00
Armin Novak
88d310ff2c Fixed compiler warnings (casts, ...) 2018-10-18 09:09:30 +02:00
Armin Novak
e319ec5bd3 Fixed missing return in server_rdpsnd_get_formats 2018-10-17 16:17:41 +02:00
Armin Novak
7e1589a3e4 Added default rdpsnd formats. 2018-09-26 12:49:52 +02:00
Armin Novak
c60ab7d068 fixed stuff 2018-09-26 12:49:52 +02:00
Armin Novak
2cf0662559 Unified format support for rdpsnd. 2018-09-26 12:49:52 +02:00
Armin Novak
40dae15cff Moved server-common to public header. 2018-09-26 12:49:09 +02:00
Armin Novak
d56efaae8b Fixed server format selection. 2018-09-26 12:49:09 +02:00
Armin Novak
16531e1437 Fixed server audin callback, provide more information. 2018-09-26 12:49:09 +02:00
Armin Novak
5aa4b702c0 Fixed dst_format 2018-09-26 12:49:09 +02:00
Armin Novak
12f1cf9e35 Fixed default format. 2018-09-26 12:49:09 +02:00
Armin Novak
0560832b5f Using common audio formats for input. 2018-09-26 12:49:09 +02:00
Armin Novak
db2a0dbdc0 Unified format selection. 2018-09-26 12:49:09 +02:00
Armin Novak
5e14bb1b11 Mac fixes 2018-09-26 12:49:09 +02:00
Armin Novak
e61219eb58 Fixed mac callbacks. 2018-09-26 12:49:09 +02:00
Armin Novak
d513f184e9 Fixed shadow server callbacks. 2018-09-26 12:49:09 +02:00
Armin Novak
18f97d03e7 Cleaned up defaults. 2018-09-26 12:49:09 +02:00
Armin Novak
106dde9571 Working mic redirection for shadow server. 2018-09-26 12:49:09 +02:00
Armin Novak
28efbbc01f Refactored audio_format* functions. 2018-09-26 12:49:09 +02:00
Armin Novak
dab5770fed Added microphone support to shadow server. 2018-09-25 11:14:10 +02:00
Armin Novak
fad20be6e6 Fixed missing includes. 2018-08-27 14:34:42 +02:00
Armin Novak
62c1696d4c Removed use of unchecked sprintf 2018-08-27 14:34:42 +02:00
Armin Novak
c3a26b0d6a Removed +async-transport options
The async transport option is broken by design.
If used the main loop is called from the transport thread and the
main thread of the application.
Unless the transport layer is refactored to just work on queues
(input and output) this option will never work, therefore remove it.
2018-08-22 13:56:37 +02:00
Armin Novak
cc44119dcf Fixed missing array initializer values 2018-08-01 12:56:18 +02:00
Armin Novak
31f933bc11 Fixed mac server compile issue. 2018-08-01 10:04:00 +02:00
Martin Fleisz
a0fddd1747
Merge pull request #4530 from akallabeth/order_refactor
[leak fixes] Refactored order updates
2018-07-04 14:21:36 +02:00
Armin Novak
73b8963d14 Added automatic format support filter. 2018-07-02 16:33:50 +02:00
Armin Novak
30283e18e5 Fixed warning. 2018-07-02 16:20:39 +02:00
Pascal J. Bourguignon
15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
David Fort
456b0e8934
Merge pull request #4453 from akallabeth/sound_channel_refactor
Sound channel refactoring
2018-05-03 11:56:58 +02:00
Kyle Evans
a7c0632bf2 Use SetFreeRDPCMakeInstallDir where CMake modules are installed 2018-05-02 10:36:52 -05:00
Armin Novak
4e66972616 Fixed remaining global order buffers. 2018-05-02 08:54:21 +02:00
Armin Novak
3f712cab70 Fixed formatting of changed files. 2018-04-05 13:14:16 +02:00
Armin Novak
f89c1857b9 Rewrite of sound and microphone channels
The sound and microphone redirection channels (and in part TSMF)
did not properly decouple encoding/decoding from the backends used
to play/record sound.
Encapsulating encoding/decoding in rewritten freerdp_dsp_* functions
with variable backends, simplifying alsa/oss/pulse/... audio backends.
2018-04-05 13:14:16 +02:00
Armin Novak
d249335708 Removed winpr_exit
As the cleanup functions are called by atexit a dedicated
cleanup call is no longer required.
2018-04-03 12:56:33 +02:00
Armin Novak
1c72127c6b Do not clear invalid region if no client connected. 2018-03-07 15:37:20 +01:00
Armin Novak
2ad5b3510d Fixed windows shadow server update copy. 2018-03-07 15:37:20 +01:00
Armin Novak
44eebbb6e0 Fixed compiler warnings. 2018-03-07 14:47:06 +01:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
1f7d33a2f2 Fixed read/write of surface bits command.
The optional field exBitmapDataHeader of TS_ BITMAP_DATA_EX was ignored.
Read and expose the data (currently unused)
2018-03-01 11:38:59 +01:00
Martin Fleisz
5d1ff02d02
Merge pull request #4414 from akallabeth/pthread_cleanup_fix
Pthread cleanup fix
2018-02-15 11:02:37 +01:00
Armin Novak
990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
Armin Novak
2d58e96dcc Exit main thread with winpr_exit to trigger resource cleanup.
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +01:00
Armin Novak
bb061cedb1 Increased target bitrate for shadow server.
The target bitrate (1Mbit) was much too small for proper shadowing
on devices with higher resolutions. Increased to 10Mbit to improve
image quality.
2018-02-02 13:59:08 +01:00
Armin Novak
5f439f06b1 Fixed AVC444v2 detection. 2018-02-02 10:39:33 +01:00
Armin Novak
3b70d1178b Added AVC444 chroma support to shadow server. 2018-02-02 10:39:33 +01:00
Armin Novak
7305828122 Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
David Fort
3b670703fb
Merge pull request #4277 from akallabeth/mac_server
Mac fixes
2017-12-12 10:40:14 +01:00
Armin Novak
877f161465 Reset errno in X11 monitor enumeration
XOpenDisplay may succeed but set errno,
reset at the end of the function.
2017-11-29 14:17:27 +01:00
Armin Novak
33271415fe Fixed /monitors argument checks. 2017-11-29 14:13:50 +01:00
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
Bernhard Miklautz
e02af8287e Merge pull request #3160 from akallabeth/stream_fixes
Stream fixes
2016-03-01 16:44:19 +01:00
Norbert Federa
b4b8239bf6 Merge pull request #3176 from bmiklautz/shadow_subsystem
Export shadow subsystem
2016-02-29 17:39:18 +01:00
Bernhard Miklautz
25506348d0 Merge pull request #3168 from akallabeth/visibility_fixes
Fixed default visibility.
2016-02-29 16:59:58 +01:00
Bernhard Miklautz
1b926f8740 build: export freerdp-shadow
pkg-config and cmake find package
2016-02-29 16:22:24 +01:00
Bernhard Miklautz
f15c050d1f shadow/subsystem: fix windows build
* add dependency to freerdp-client
* add version information to freerdp-shadow-cli
2016-02-29 16:02:13 +01:00
Armin Novak
c182be093d Removed module.def from build config. 2016-02-29 15:24:07 +01:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Armin Novak
b69047064a Replaced stream manipulation with EnsureCapacity. 2016-02-29 12:54:31 +01:00
zihao.jiang
176ad52bd5 server/shadow: Export API to set built-in subsystem modules for freerdp-shadow-subsystem 2016-02-28 13:51:19 +08:00
Armin Novak
11c442562a Fixed dupliace FREERDP_API declarations. 2016-02-27 11:36:34 +01:00