Commit Graph

225 Commits

Author SHA1 Message Date
akallabeth a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth a360f1ca8c [build] fix a few compiler warnings 2023-03-13 13:04:45 +01:00
akallabeth cf9777cd92 [channels] simplified server linking 2023-03-01 08:18:34 +01:00
akallabeth c3a82daad6 [channels] simplified client linking 2023-03-01 08:18:34 +01:00
Armin Novak 70f6c09ff4 [core] fix persistent bitmap cache setting
* Only activate if both, client and server support the capability
* Use settings getter to access setting
2023-01-26 09:30:17 +01:00
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
akallabeth 075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth 29c92af194 [channels,rdpgfx] fixed logger setup 2022-12-18 15:14:30 +01:00
akallabeth 06c070fc4d [gfx] moved rdpgfx_get_codec_id_string to utils
the gfx related stringify helpers are nice to have outside the channel
too so that meaningful logmessages can be written.
2022-12-18 15:14:30 +01:00
akallabeth a2329281a4 [channels,rdpdr] fix possible surface leak
* Ensure DeleteSurface is called before CreateSurface: Under certain
  conditions it is possible that there already exists a surface with the
  same id as the new CreateSurface PDU. Delete the already existing
  instance in that case before creating a new one.
* Simplify surface cleanup on shutdown: Use HashTable_Foreach
2022-12-15 14:57:29 +01:00
akallabeth febc4b3073 [gdi,gfx] Fixed possible memory leaks
* WINPR_ASSERT all callbacks required to be set
* Unify cache slot creation/destruction
* Destroy cache slot before setting it
2022-11-22 15:30:31 +01:00
Armin Novak 7c5652c15a Fixed -Wmissing-prototypes 2022-11-21 10:12:31 +01:00
akallabeth 1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
David Fort 3478051f15 dynamic channels: mutualize things for listeners and plugins
The same code is copied in all dynamic channels to create a plugin, have a listener,
and manage the channel lifecycle. This patch does a mutualization effort so that channels
only have to code things that are specific to them.
2022-07-07 12:21:23 +00:00
Armin Novak 42caca9223 Do not automatically set GfxSmallCache 2022-07-06 13:09:46 +00:00
Armin Novak 3bedc1f92e Fixed swscale and cairo checks 2022-07-06 13:09:46 +00:00
Armin Novak ada4671435 Cleaned up client rdpgfx
* use rdpContext for setup
* add WINPR_ASSERT
* Removed duplicated rdpSettings variables
2022-06-27 11:06:27 +02:00
akallabeth f1d3d457fb Code cleanups/initializations 2022-06-23 14:19:50 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth 1626530825 Some cleanups in rdpgfx channel 2022-06-23 07:45:55 +02:00
akallabeth 5b163b7918 Add GetRdpContext function pointer for dynamic channels 2022-06-23 07:45:55 +02:00
David Fort e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
Marc-André Moreau 161617c4a4 Implement RDP persistent bitmap cache 2022-06-08 23:37:06 +02:00
Pascal Nowack 9d627e0df2 channels/server: Add APIs for DVCs to get notified of channel id
This allows server implementations to watch these channel ids for their
creation statuses.
2022-06-08 15:26:51 +02:00
akallabeth 46ccf6d0d7
Fixed RDPGFX_CAPVERSION_106 according to errata (#7924)
The [MS-RDPEGFX] spec is not really sure which value to use, so we
just announce both, the one from the spec and the one from errata.
2022-05-25 13:11:29 +02:00
Armin Novak 387d4bd8fd Disable scaled output PDU if no scaling support compiled 2022-05-24 10:08:53 +02:00
Armin Novak 40f5578206 Add GFX 10.7 capsets 2022-05-24 10:08:53 +02:00
akallabeth 962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +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
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
Armin Novak fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00
akallabeth 4b416968c4 Added checks and asserts in rdpgfx_common 2022-01-27 10:33:30 +01:00
akallabeth 6f154da1ae Added plausibility checks and assert to rdpgfx_read_header 2022-01-27 09:50:35 +01:00
zbstao 5b8db18f26 Added pduLength check in rdpgfx_read_header function
if pduLength is zero will lead to an infinite loop in rdpgfx_recv_pdu function.
2022-01-27 16:24:26 +08:00
Armin Novak fe4c30fc54 Fixed warning in rdpgfx server channel 2021-12-14 13:46:34 +01:00
Armin Novak 96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
akallabeth 7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
akallabeth 7dfdd248ee
Monitor coordinates are exclusive (#7145)
* Monitor coordinates are exclusive

* Remove force override of shadow resolution.

The client might ignore the server requested values, in that case
retry
2021-07-07 11:54:01 +02:00
akallabeth 0ab809d696
Fixed WINPR_ASSERT statement (#7148) 2021-07-02 18:42:22 +02:00
akallabeth a199d2a051 Added better logging and assertions for gfx 2021-07-02 09:53:24 +02:00
akallabeth 2101aadceb Fixed missing assertions and default color depth 2021-07-02 09:53:24 +02:00
akallabeth bd256b91bc Fixed disabling of AVC444 mode if requested 2021-07-01 11:56:17 +02:00
Armin Novak 8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
Armin Novak 5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak 31862e60f9 Added missing return checks 2021-06-16 11:46:42 +02:00
Armin Novak 880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00