Commit Graph

74 Commits

Author SHA1 Message Date
akallabeth
490ca0453b
[winpr,stream] use Stream_BufferAs instead of casting 2024-10-01 10:34:42 +02:00
akallabeth
11b7633dc0
[channels] use Stream_BufferAs
For WTSVirtualChannelRead and WTSVirtualChannelWrite use Stream_BufferAs
to cast to correct type.
2024-10-01 10:28:13 +02:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
7d67b8e204
[return checks] fix use of SetEvent 2024-09-16 06:47:58 +02:00
akallabeth
8b6091a007
[winpr,wtsapi] improve API usage
* Mark WTSVirtualChannelOpen and WTSVirtualChannelOpenEx with
  WINPR_ATTR_MALLOC to enforce compiler checks for resource cleanup
* Fix unused result warnings, use the result or cast to (void) where not
  requierd
2024-09-14 21:29:31 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
15456e1ee1
[warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
81d2c1f057 [clang-tidy] clang-analyzer-core.NullDereference 2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth
ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
akallabeth
278a56263b [channels,rdpgfx] add server side channel checks
check if the message is allowed in current channel state.
2024-01-29 19:26:18 +01:00
akallabeth
01e415b801 [channel,rdpgfx] use dynamic WLog for server channel 2024-01-29 19:26:18 +01:00
Armin Novak
650154b2e7 [channels,rdpgfx] add debug logs for server side
add debug logs for cache import offer and reply
2024-01-10 21:49:38 +01:00
Armin Novak
6e1bb4e1c3 [channels,gfx] default reply to cache import offer
by default we do not use the cache, so reply with 0 imported messages by default.
can be overridden by server implementations, but provides a sane default
if not.
2023-12-20 11:26:54 +01:00
akallabeth
04f5790fd4 [channel,rdpgfx] fix wrong return type 2023-08-25 08:42:31 +02:00
Armin Novak
62da5c7e8e [channels,rdpgfx] make internal server thread optional 2023-07-31 20:18:48 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
cf9777cd92 [channels] simplified server linking 2023-03-01 08:18:34 +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
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
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
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
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
fe4c30fc54 Fixed warning in rdpgfx server channel 2021-12-14 13:46:34 +01:00
akallabeth
7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +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
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
akallabeth
51811a369f Fixed missing stream length checks. 2020-11-20 09:39:25 +01:00
Armin Novak
5690780bdd [RDPEGFX] checks for cache import, prevent 0 size allocations 2020-03-06 12:28:21 +01:00
Kobi Mizrachi
3f9e6ca978 rdpgfx: surface_to_scaled_window: fix pdu type 2019-12-12 11:10:44 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
kubistika
49e7c5ddc0 rdpgfx/server: Fix formatting: rdpgfx_recv_cache_import_offer_pdu 2019-06-06 07:53:34 +03:00
kubistika
e2eeb9f870 rdpgfx: Add WITH_DEBUG_RDPGFX option 2019-06-04 10:29:05 +03:00
Armin Novak
48a12ae131 Fixed memory leak and return values in rdpgfx_recv_caps_advertise_pdu 2019-05-08 12:05:58 +02:00
akallabeth
95b8b43d4d
Merge pull request #5376 from kubistika/bugfix/rdpgfx-server-v10.6-PDUs
rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec
2019-05-06 15:32:32 +02:00
Armin Novak
841cb70f91 Fixed const correctness of gfx function pointer
Signed-off-by: Mati Shabtay <matishabtay@gmail.com>
2019-05-05 16:17:15 +03:00
kubistika
e9faaedc85 rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec 2019-05-05 12:34:57 +03:00
Armin Novak
8af9c138e3 Fixed input stream length checks in rdpgfx_recv_caps_advertise_pdu 2019-04-26 13:11:46 +02:00
Mati Shabtay
88b7859c87 server/rdpgfx_main.c: Fixed caps advertise PDU recv (#5304) 2019-03-15 08:37:35 +01:00