There are two loops polling the transport pdu receiver in non-blocking mode
when waiting for reaching CONNECTION_STATE_ACTIVE rdp state.
In case of an invalid pdu size in the tpkt header this leaded to an endless
loop, utilizing 100% of a cpu core.
Added a sleep and limited the max loop time to the tcp ack timout value.
If somewhere in freerdp_connect freerdp_abort_connect was called
the user callbacks Authenticate, GatewayAuthenticate and
Verify[Changed|X509]Certificate[Ex] must not be called.
This PDU is required by Microsoft servers in order for bandwidth
management to work correctly. Even if we do not support multi-transport
for now we should just send a PDU with flags set to 0 to enable correct
handing of bandwidth measurement PDUs.
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
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>
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>
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>
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>
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.
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>
* Split common functionality from client code
* Clean up client code and use proper defines for constants
* Implements the channel code to read/write server side
messages.