Commit Graph

253 Commits

Author SHA1 Message Date
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
Armin Novak
78b8df86bc [core] unify settings copy set/reset 2023-01-18 09:55:06 +01:00
Armin Novak
6ff458bb34 [core] Make remote rdpSettings* context wide
The settings struct containing the data sent by the remote is now
context wide. This way it is always possible to retrieve the data.
2023-01-18 09:55:06 +01:00
akallabeth
d3e9210985 [core] added freerdp_is_active_state
Since client and server use different states to indicate the connection
is activated, add this convenience function to determine that
2022-12-12 12:59:32 +01:00
akallabeth
cb5c98aab0 [core,client] Add PostFinalDisconnect callback
To have more fine granied control add a new callback.
Now you have the following callback pairs:
* PreConnect <--> PostFinalDisconnect
* PostConnect <--> PostDisconnect
2022-12-09 12:30:14 +01:00
akallabeth
d83f70bc32 [core,transport] event handle for transportIO
With the latest client changes the internal event loop requires a handle
to wait on. Add a new function to (re)set the newly added transport event handle.
2022-11-16 15:32:32 +01:00
akallabeth
2dcffa62c5 Split freerdp_connect
* freerdp_connect_begin
2022-11-04 14:46:58 +01:00
akallabeth
498635a317 Added new functions to test validity of MCS
* freerdp_is_valid_mcs_create_request
* freerdp_is_valid_mcs_create_response
2022-11-04 14:46:58 +01:00
akallabeth
a29343251c Fixed invalid pointer in freerdp_connect
After rdp_client_connect the settings pointer might have changed.
Reset it from the rdpContext.
2022-10-27 09:03:54 +02:00
Armin Novak
d0ae1c8160 Moved pubSub to rdpRdp 2022-07-06 12:01:23 +02:00
Armin Novak
29af8a45b6 Fixed missing LoadChannels calls and settings on redirect 2022-06-27 14:27:12 +02:00
akallabeth
d745ba7c28 Assert function arguments in freerdp.c 2022-06-27 11:21:24 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
03e20cb541 Clean up pcap capture module 2022-06-23 07:45:55 +02:00
akallabeth
97c05cbec5 Added freerdp_disconnect_before_reconnect_context 2022-05-05 14:14:45 +02:00
akallabeth
104157ed6b Added new API freerdp_abort_event 2022-05-05 14:14:45 +02:00
Armin Novak
8b011b6c3b Use define for japanese keyboard type 2022-04-22 10:20:09 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth
102e43baaa Added functions to set transport io user context 2022-03-28 15:52:32 +02:00
akallabeth
14568872a9
Instance cleanup (#7738)
* Cleaned up freerdp::autodetect

* Deprecate freerdp::input

* Deprecated freerdp::update

* Deprecated freerdp::settings

* Deprecated freerdp::autodetect

* Removed rdpTransport::settings

* Deprecated freerdp_per::update|settings|autodetect

* Fixed mac client and server compilation

* Fixed windows compilation

* Added deprecation warnings

* Fixed initialization of structs.

* Fixed android build

* Fixed freerdp_client_context_new const correctness

* Fixed checks for android implementation

Replaced checks with assertions where appropriate

* Fixed checks for windows client

Replaced checks with assertions where appropriate

* Fixed proxy client pointer dereference
2022-03-23 13:18:35 +01:00
Armin Novak
71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
akallabeth
fa3cf9417f
Fixed #7696: Abort freerdp_connect if manually canceled (#7700)
If freerdp_abort_connect is called, set FREERDP_ERROR_CONNECT_CANCELLED
This way freerdp_reconnect can distinguish between network issues and
user interaction and abort a retry attempt.
2022-03-07 13:47:43 +01:00
akallabeth
3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak
d1f8c00f7b Fixed duplicated symbols 2022-03-03 11:26:48 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Hiroshi Ota
e27a7e834e Fix missing KBD_JAPANESE condition 2022-02-14 08:42:36 +00:00
Armin Novak
9c7ec3888a Added deprecation to *get_fds functions 2022-01-21 08:59:09 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
Armin Novak
6973c5dce2 Removed internal members of rdpInput from API header 2022-01-18 11:24:23 +01:00
Armin Novak
d210ac5e33 Removed internal members of rdpUpdate from API header 2022-01-18 11:24:23 +01:00
akallabeth
1265114be7
Fixed freerdp_disconnect (#7479)
Added a missing call to freerdp_abort_connect to ensure all
threads terminate in an orderly fashion
2021-12-06 09:41:05 +01:00
akallabeth
03a9ca80c8
Refactor proxy (#7312)
* Added hidden transport dump and replay options

* Added settings to enable transport dump and replay
* Added check in freerdp_connect to skip authentication on
  dump replay

* Fixed proxy issues

* Proper shutdown handling
* Uninitialized variables
* Skip proxy-client channels, initialize from peer channels and
  config
* Filter static channels like dynamic ones
* Added proxy module filtering from config data (channels, input, ...)

* Removed oboslete proxy decoding related files

* Added defines for RDPECAM channel

* Added proxy config options:

* VideoRedirection
* CameraRedirection

* Fixed duplicate channel free
2021-09-23 14:52:03 +02:00
akallabeth
e0a531f728
Channel fixes (#7309)
* Added missing CHANNEL_NAME defines.

* Fixed FreeRDP_ChannelDefArray setter

* Fixed code duplication due to merge error

* Added public function freerdp_channels_from_mcs

* Fixed const correctness in mcs
2021-09-22 14:27:21 +02:00
Armin Novak
0ccebb2a0f Fixed missing NULL checks. 2021-09-20 10:59:59 +02:00
akallabeth
6b24c2be10 Added WINPR_ASSERT and cleanup fixes in freerdp.c 2021-09-20 10:59:59 +02:00
akallabeth
1904020d7f
Some code cleanups and WINPR_ASSERT (#7281) 2021-09-10 09:06:35 +02:00
Armin Novak
17f530a866 Transport opaque 2021-09-09 08:36:01 +02:00
akallabeth
c2a7a78d94 Changed transport IO functions to take rdpContext 2021-09-06 10:11:14 +02:00
akallabeth
32b3f54bb3 Expose CONNECTION_STATE via public API
* Expose type CONNECTION_STATE
* Add getter freerdp_get_state
* Add helper freerdp_state_string
2021-09-06 10:11:14 +02:00
akallabeth
f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak
d65d4ee4fb Allow variable arguments to setChannelError 2021-07-29 15:09:53 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
Martin Fleisz
cec261c4db Cleanup internal channel management
This PR gets rid of some unneeded/unused field and functions in the
channel handling code. It also makes it possible to call
VirtualChannelWrite from any thread like the Windows API allows. The
only restriction is that the channel must be initialized
(VirtualChannelInit) from the same thread that called freerdp_connect.
2020-10-29 15:53:32 +01:00
Armin Novak
3b63903d3f Removed obsolete connectErrorCode 2020-09-16 10:21:15 +02:00
Alexandr
cf2daeb01d
cleanup of https://github.com/FreeRDP/FreeRDP/pull/6448 (#6455)
* Implemented switchable transport layer

Co-authored-by: akallabeth <akallabeth@posteo.net>
2020-09-02 13:37:04 +02:00
Kobi Mizrachi
5d39200cd7 libfreerdp: core: add ServerHeartbeat callback 2020-07-07 09:57:53 +02:00
Armin Novak
d5b5088eac Fixed misinterpretation of SendChannelData
SendChannelData was defined with a return value of type int, but
used as BOOL everywhere. Fix the definition to match use.
2020-03-10 12:21:14 +01:00