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
Armin Novak
0f729d2b2c
Fixed conversion and return checks.
...
* Fix some missing argument checks for function pointer implementations
* Fix broken return value check for client->SendChannelData
* Updated const correctness for function pointer implementations
2020-03-04 14:44:03 +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
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
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
asapelkin
82eadad4a4
Fix some static analizer warnings
2019-10-22 15:39:54 +02:00
Armin Novak
8d088387da
Added function to get an error category for better error handling.
2019-10-03 11:19:03 +02:00
Armin Novak
f78c5f5c44
Map gateway errors in freerdp_get_last_error_name
2019-10-01 09:47:26 +02:00
Armin Novak
6f9cb89c5d
Better log message for resetting last error state.
2019-09-23 11:22:45 +02:00
kubistika
ef3a3ae9e6
Export Error Info PDU.
2019-05-19 14:42:16 +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
2a26aa0d87
Unified update->BeginPaint and update->EndPaint
...
Since these functions were called from 2 different threads
(main thread or dynamic channel) depending on fastpath or
gfx channel use lock between these.
If not locked the invalid region may be accessed from both
threads and lead to crashes as experienced with nightly df280a7ff
2019-04-11 15:33:23 +02:00