Commit Graph

13783 Commits

Author SHA1 Message Date
Armin Novak 548bec9ef2 Setting optional last error on transport close
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:35:49 +01:00
Armin Novak 895cb8f944 Added macro freerdp_set_last_error_if_not
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:34:27 +01:00
Martin Fleisz 3e3458cc3c
Merge pull request #5821 from akallabeth/smartcard_log_err
Added debug log messages for SCARD_E_NO_SERVICE
2020-01-09 10:12:14 +01:00
Martin Fleisz f7f2ab302f
Merge pull request #5819 from akallabeth/last_error_informative
make Last error more informative
2020-01-09 08:47:09 +01:00
Martin Fleisz 2c210feadf
Merge pull request #5818 from akallabeth/winmm_refactor
RDPSND device API refinements
2020-01-09 08:26:08 +01:00
Armin Novak c98b3e0cef Added debug log messages for SCARD_E_NO_SERVICE
Log where and what caused SCARD_E_NO_SERVICE return in smartcard
wrapper
2020-01-09 08:20:42 +01:00
Armin Novak e86849759a Fixed waveOutClose, call waveOutReset first.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 18:25:08 +01:00
Armin Novak 105799de31 Added an error message in rdp_set_error_info
If the provided arguments are not properly set up write
an error message explaining what is wrong.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:51:00 +01:00
Martin Fleisz 4e06855826 proxy: Add received response in case of an error 2020-01-08 17:45:10 +01:00
Armin Novak 2391a1528b CONNECT_TRANSPORT_FAILED in transport_check_fds
If TRANSPORT_LAYER_CLOSED was detected in transport_check_fds
check if there is already a connection error set, otherwise
set FREERDP_ERROR_CONNECT_TRANSPORT_FAILED to allow proper
reconnect or abort handling.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:42:08 +01:00
Armin Novak 7d252cdc8e Added freerdp_set_last_error_ex function
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:39:25 +01:00
Armin Novak b0de74cad2 Fallback definition for LIBUSB_HOTPLUG_NO_FLAGS
The flag was first introduced with libusb 1.0.16, so
define it if we are using an older version.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:14:09 +01:00
Armin Novak f720ec5383 RDPSND device API refinements
* Added default format callback for rdpsnd backend to allow
  different default input formats (different samplerates, ...)
* Made WINMM backend in flight packet limitation a compile time
  option
* Fixed missing buffer copy in winmm backend

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:14:09 +01:00
Martin Fleisz 05a865281e channels: Fix memory leak and make log messages more precise 2020-01-08 16:49:15 +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 8c3054851c winpr: thread: fix wrong log level in ThreadCloseHandle 2020-01-08 11:59:34 +01:00
KunMing Xie 7fec130dbc wf_rail.c: fix crash if CreateWindowEx failed (#5812)
* wf_rail.c: fix crash if CreateWindowEx failed

Co-authored-by: tensorflow123 <kunming.xie@hotmail.com>
2020-01-08 09:02:49 +01:00
David Fort 004f59083d
Merge pull request #5802 from dragonuaix/master
Update comm_serial_sys.c
2020-01-08 08:08:42 +01:00
Kobi Mizrachi 77ca7ac2ad server: proxy: make fallback to tls configurable 2020-01-08 07:58:03 +01:00
Martin Fleisz c3f180a08b
Merge pull request #5813 from akallabeth/win_drive_name_fix
Fix #5805: windows hotplug drive detection.
2020-01-07 13:32:08 +01:00
Armin Novak 44ac64ffb9 Fixed duplicate definition in TestGetComputerName 2020-01-07 10:51:01 +01:00
Armin Novak c24da9e856 Fixed freerdp_settings_new error cleanup. 2020-01-07 10:49:17 +01:00
Armin Novak ac553e1bb5 Fix #5805: windows hotplug drive detection. 2020-01-07 10:35:12 +01:00
David Fort 31a4e2ad8b
Merge pull request #5745 from akallabeth/urbdrc_rewrite
Urbdrc rewrite
2020-01-06 09:23:45 +01:00
Martin Fleisz 5d804852b5
Merge pull request #5811 from mfleisz/mac_rdpsnd_workaround
rdpsnd: Do not set output device on Catalina or later (#5747)
2020-01-03 14:47:10 +01:00
Martin Fleisz a98e153b9d rdpsnd: Do not set output device on Catalina or later (#5747) 2020-01-03 13:31:15 +01:00
Martin Fleisz 483d09b760
Merge pull request #5806 from mfleisz/fix_no_audio_device_handling
Fix audio channel init when no audio devices are present
2019-12-30 14:47:45 +01:00
Martin Fleisz d21e0a6d6d Fix audio channel init when no audio devices are present
This PR fixes the handling of using rdpsnd or audin when the system has
no audio device available.
In case of a missing playback device the
Windows backend now correctly reports an error and the fake rdpsnd
backend is loaded.
If audin is enabled and no microphone is present the channel
initialization will report an error but it won't cut the connection (as
it did before).
2019-12-30 12:59:14 +01:00
Norbert Federa 2df3eb0455
Merge pull request #5803 from nfedera/nf_add_transport_layer_closed_check
transport: check if layer was set to closed
2019-12-27 14:41:24 +01:00
Norbert Federa a4988f5469 transport: check if layer was set to closed
There are several code paths and error conditions where
transport->layer is correctly set to TRANSPORT_LAYER_CLOSED but
the required code for checking that state was missing.

E.g. write errors in the rdg code resulted in marking the transport
layer as closed but the transport code would indefinitely continue
to read from the receiving socket.
2019-12-27 12:37:03 +01:00
dragonuaix 4c1d57b3d0
Update comm_serial_sys.c 2019-12-26 16:48:00 +02:00
David Fort 97d9d0aa11
Merge pull request #5795 from akallabeth/swscale_find_fix
Fixed SWScale cmake find script.
2019-12-20 08:00:03 +01:00
Armin Novak 744c31a69e Fixed SWScale cmake find script.
* Wrong name for pkg-config (thanks @floppym for pointing that out)
* Formatting issues, there were spaces in path and variables that
  should not have been there.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 08:45:29 +01:00
David Fort 57dc6f2239
Merge pull request #5790 from akallabeth/rdpei_no_thread
Removed touch input channel thread
2019-12-18 22:09:52 +01:00
Martin Fleisz bb16a101f8
Merge pull request #5793 from akallabeth/smartcard_cherry_pick
Tell the server that smartcard is redirected
2019-12-18 15:11:35 +01:00
Armin Novak 6482a638f4 Increased client build number
According to [MS-RDPESC] 1.7 Versioning and Capability Negotiation
the client build is used to determine feature / behaviour.
Announce something more modern than Windows XP SP3.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-18 12:22:18 +01:00
Ondrej Holy 0531624826 Tell the server that smartcard is redirected
There were server-side changes on Windows 2012 and newer regarding
smartcards, namely the Smart Card Service start and stop behavior:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh849637(v%3Dws.11)#smart-card-service-start-and-stop-behavior

Some people see "No valid certificates were found on this smart card",
when the Smart Card Service is not running and has to use various
workarounds to start the service manually, e.g.:
http://blogs.danosaab.com/2016/12/using-smart-card-with-remote-desktop-connection-on-mac-osx/
http://www.edugeek.net/forums/windows-server-2012/161255-smart-card-service-issue-windows-server-2012r2-terminal-services-hyperv.html

I've been looking at RDP specifications and found that
REDIRECTED_SMARTCARD should be probably specified in TS_UD_CS_CLUSTER
block flags when the smartcard is redirected, but it is not currently:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/d68c629f-36a1-4a40-afd0-8b3e56d29aac

This might be the reason, why the Smart Card Service is not
autostarted for some people. Let's try to set this flag and see what
will happens...

https://github.com/FreeRDP/FreeRDP/issues/4743
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-18 12:22:11 +01:00
Armin Novak 947645520d Removed touch input channel thread
The touch input channel only sends small events (touch points et al)
and therefore does not require a heavy processing thread.
2019-12-18 11:36:12 +01:00
Armin Novak d044915a7e Fixed stream handling and missing includes. 2019-12-17 15:51:24 +01:00
Kobi Mizrachi 2e1d719ab1 server: proxy: proxy keyboard leds and imei 2019-12-17 15:33:11 +01:00
Martin Fleisz 02e7a07832
Merge pull request #5768 from akallabeth/timezone_update
Timezone update
2019-12-17 14:11:40 +01:00
Kobi Mizrachi 200f50c1f6 update: add proper stream checks 2019-12-17 12:38:41 +01:00
Kobi Mizrachi f92e941129 winpr: SetWaitableTimer should not free the handle if it fails 2019-12-17 09:46:00 +01:00
xie.kunming e16bef6b4f rdp.c : fix DATA_PDU_TYPE_STRINGS mismatch declaration when WITH_DEBUG_ALL=ON 2019-12-16 12:14:59 +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
xie.kunming 9bcbd4dc43 fix typo of jpeg 2019-12-16 08:16:33 +01:00
Kobi Mizrachi 3f9e6ca978 rdpgfx: surface_to_scaled_window: fix pdu type 2019-12-12 11:10:44 +01:00
Kobi Mizrachi 033ee763e9 core: server: update: fix update_send_new_or_existing_notification_icons 2019-12-12 11:10:44 +01:00
Kobi Mizrachi edeb449185 core: server: add missing NULL check in FreeRDP_WTSVirtualChannelRead 2019-12-12 11:10:44 +01:00