Commit Graph

189 Commits

Author SHA1 Message Date
David Fort
040d14b673
Merge pull request #4869 from akallabeth/clear_fix
Fix #4868: Separate codec reset from initial setup
2018-09-24 09:46:33 +02:00
rbarnett
5d3e76bd80 Replace cryptic names; move the disconnect ultimatum reasons enum into public API and rename; remove setter 2018-09-19 09:36:39 -05:00
Armin Novak
13e59b5d6a Fix #4868: Allow empty bands data. 2018-09-19 14:18:29 +02:00
rbarnett
8458266183 Store the disconnect provider ulimatum reason in a new field in struct rdp_context and move the test for a logoff reason to xf_client.c 2018-09-18 15:31:10 -05:00
Armin Novak
fad20be6e6 Fixed missing includes. 2018-08-27 14:34:42 +02:00
Armin Novak
7a6b8a04b9 Fixed channel reconnect after redirect. 2018-07-13 13:11:38 +02:00
Armin Novak
f617d0d3c1 Moved automatic reconnect after timeout to freerdp_connect. 2018-07-10 14:09:43 +02:00
Armin Novak
7a39dcd7e2 Updated reconnect to handle cases where PostConnect was not called
freerdp_reconnect might be called after a freerdp_connect failed due
to a TCP timeout waiting for user input.
In such cases we need to know if PostConect was already called and
do that if not.
2018-07-10 12:04:27 +02:00
Armin Novak
0d1895e4e7 Fixed async input return value check. 2018-07-09 17:45:50 +02:00
Armin Novak
35cd438eca Added enum for client connection state. 2018-06-25 09:25:27 +02:00
Armin Novak
273655a850 Follow up fix for #4631
Remember the callback state to avoid calling reerdp_channels_post_connect
before the corresponding client callback has benn called.
This might happen during redirection and reconnection.
2018-06-18 10:44:35 +02:00
Armin Novak
685f5a8d20 Do not clear last error if not reconnecting. 2018-04-11 10:06:11 +02:00
Armin Novak
7af9ba9171 Refactored reconnect and redirect API
Reconnect and redirect share the same code on disconnect.
Move that to a single function and export it as it may be required
to terminate the session properly before reconnect is called.
2018-04-09 14:04:30 +02:00
Armin Novak
0a7691de58 Fixed channel (dis)connect on redirect or reconnect. 2018-04-09 11:26:12 +02:00
Armin Novak
f840150a54 Fixed missing return value checks. 2018-04-04 13:24:32 +02: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
Armin Novak
990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
David Fort
191b8f950f Fix for #4330
Since ec027bf dynamic resolution is broken when used with egfx. Before that commit
we were tracking a server sent resize by setting a DesktopResize callback. This callback
is called when the desktop is resized by the server. Anyway the problem was that when this
callback is called, the activation sequence is not always completed, which were leading to
some freeze with 2012r2 servers (sending packets before the sequence is finished).
So with the faulty commit, we are tracking server resizes by subscribing to the Actived
event, that is called at the end of a reactivation sequence, so we're sure to not send packets
when not fully activated.
Anyway the issue that shows on (#4330) is that when you use egfx, no reactivation sequence happens,
the server only sends a ResetGraphics message with the new size, and so we miss the resized event.
This fix introduces a new GraphicsReset event, makes the display channel subscribe to that event,
and react accordingly.
2017-12-23 13:50:54 +01:00
Martin Fleisz
ec027bf46c
Merge pull request #4318 from hardening/display_improvement
Dynamic resolution improvements
2017-12-20 13:43:22 +01:00
David Fort
2a6c9e1b87 Add an activated event and a Timer event
Added an event that is triggered when the activation sequence is finished.
We also define a timer event that is neat to have for regular operation.
2017-12-19 15:21:15 +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
Armin Novak
4fe12b0ea3 Fix #4247: warnings introduced with #3904 2017-11-20 10:18:15 +01:00
Brent Collins
e47123f05a Do not initialize SSL in freerdp_context_new, it is too early to detect the fips enabled flag
and is redundant since it is initialized later before actually using SSL.
2017-11-17 12:43:07 +01:00
Armin Novak
ce00f4dd8f Silence WLog_ERR messages if last error is set. 2017-11-06 14:02:22 +01:00
Armin Novak
d119745d97 String representation of logon_error_info 2017-03-02 18:09:51 +01:00
Norbert Federa
71ce3378da Merge pull request #3665 from realjiangms/fix_ssl_add_all_digests
Winpr/openssl: Fix digests initialization in multi-thread
2017-01-13 09:46:14 +01:00
zihao.jiang
a505a6cd27 Winpr/openssl: Fix digests initialization in multi-thread
SSL functions like OpenSSL_add_all_digests should be invoked at very beginning as they are not MT safe.
If not we might meet double free exception as following:

 #0  0x00007f23ddd71c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007f23ddd75028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x00007f23dddae2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #3  0x00007f23dddba55e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #4  0x00007f23dc6ecfcd in CRYPTO_free () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #5  0x00007f23dc6ef8d1 in OBJ_NAME_add () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #6  0x00007f23dc77dcd8 in EVP_add_digest () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #7  0x00007f23dc782321 in OpenSSL_add_all_digests () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #8  0x00007f23c781da28 in winpr_openssl_get_evp_md (md=4) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:52
 #9  0x00007f23c781dccb in winpr_Digest_Init (ctx=0x7f22d064d470, md=<optimized out>) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:344
 #10 0x00007f23d486139b in security_salted_mac_signature (rdp=0x7f23859f5a20, data=0x7f238542d4fb "\004\204\022\004", length=4743, encryption=<optimized out>, output=0x7
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/security.c:378
 #11 0x00007f23d488d73f in fastpath_send_update_pdu (fastpath=<optimized out>, updateCode=4 '\004', s=0x7f23859f5f40, skipCompression=true)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/fastpath.c:1076
 #12 0x00007f23d4891c4f in update_send_surface_frame_bits (context=0x7f23859f5540, cmd=0x7f22b2ffcc80, first=true, last=true, frameId=6)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/update.c:1041

Related reports: https://rt.openssl.org/Ticket/Display.html?id=2216&user=guest&pass=guest
2016-12-28 03:48:40 +08:00
Armin Novak
ece9491932 Printing a warning if a error is overwritten. 2016-12-19 14:13:36 +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
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -05:00
Marc-André Moreau
70c4646722 channels: restore global tables for initHandle, openHandle mappings instead of thread local storage 2016-11-14 15:23:05 -05:00
Armin Novak
6276f3d39a Added log messages for invalid function call. 2016-10-27 14:36:48 +02:00
Armin Novak
d1a28c59f7 Fixed uninitialized variable. 2016-10-13 16:57:51 +02:00
Armin Novak
3220b15730 Added missing event handle. 2016-10-06 13:43:12 +02:00
Armin Novak
f2d7766db6 Moved common async input handling to core library. 2016-10-06 13:43:12 +02:00
Armin Novak
b8b84473a3 Fixed post disconnect hook. 2016-10-06 13:43:12 +02:00
Armin Novak
22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak
122f25eb60 Fixed channel cleanup. 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
dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Marc-André Moreau
9211f44e46 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-15 20:19:15 -04:00
Martin Fleisz
b2d24a4dd2 freerdp: Fix possible crash when setting error info in server-mode 2016-03-14 15:27:15 +01:00
Marc-André Moreau
3cbd7c08f7 freerdp: fix freerdp_connect possible incorrect status code 2016-03-11 14:42:16 -05:00
Armin Novak
1036f1e296 Fixed default visibility.
When nothing is declared, only export symbols defined
with WINPR_API or FREERDP_API defined.
Override this setting if BUILD_TESTING to allow tests
access to internal functions usually not exposed.
2016-02-26 19:44:14 +01:00
Armin Novak
24c93e4de7 Resetting abortEvent only on connect and reconnect. 2016-02-23 16:32:47 +01:00
Armin Novak
cdadb58f93 Function freerdp_set_error_info fix
The public function did not wrap rdp_set_error_info.
2016-02-04 11:40:42 +01:00
MartinHaimberger
83b706c4be Merge pull request #3092 from akallabeth/get_build_config
Added get_build_config functions.
2016-01-28 15:23:24 +01:00
Armin Novak
035f127081 Added get_build_config functions. 2016-01-28 14:26:50 +01:00
Armin Novak
5542fef75d Resetting abort event on freerdp_connect. 2016-01-18 10:08:12 +01:00