Commit Graph

453 Commits

Author SHA1 Message Date
akallabeth
faae38120c [cmake,format] reformat all cmake files 2024-11-27 20:41:48 +01:00
stephanebill
4f2afa8c47 spell check with codespell 2024-11-20 16:53:40 -05:00
akallabeth
78acedb40e [warnigns] fix Wshorten-64-to-32 2024-11-11 10:22:37 +01:00
akallabeth
cb73d77d6e Merge pull request #10823 from akallabeth/rdpdr-caps-filter
[channels,rdpdr] send only used caps to server
2024-11-08 09:08:32 +01:00
akallabeth
aa371dcdd6 [channels,rdpdr] only reply enabled caps 2024-11-05 19:56:28 +01:00
akallabeth
c4412a92e2 [channels,rdpdr] send only used caps to server
* When using RDPDR only send capabilities to server we have activated,
  e.g. smartcard, drive, printer, port (serial or parallel) redirection
* Check return value of write functions
2024-11-05 19:44:03 +01:00
akallabeth
dcf5a8e28c [warnings] fix -Wswitch-default 2024-10-31 11:42:24 +01: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
26003e59cc [va_list] initialize with ={0}; 2024-09-24 11:06:18 +02:00
akallabeth
befa4233ad [warnings] fixed bugprone-not-null-terminated-result 2024-09-16 08:22:42 +02:00
akallabeth
a19305569d [assert] fix ULONG_MAX use
most of the time this was used to check ULONG limits. Replace with
correct UINT32_MAX
2024-09-16 08:22:40 +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
a4a7019f97 [channels,rdpdr] fix uninitialized warnings 2024-09-15 09:58:41 +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
cc6850bf21 [warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +02:00
akallabeth
edf6ab89f7 [warnings] fix dead store 2024-09-10 14:43:11 +02:00
akallabeth
245afb706c [function pointers] unify casts with macro 2024-09-04 20:06:45 +02:00
akallabeth
b77d6e8550 [channels] fix function pointer casts
* Cast freerdp_load_channel_addin_entry return with a union (removes the
  incompatible function pointer cast warnings)
* Typedef function pointers in tables.h
2024-09-03 15:13:58 +02:00
akallabeth
bd637c6cd1 [warnings] fix various clang-tidy warnings 2024-08-29 17:13:50 +02:00
akallabeth
cc626276d0 [warnings] integer cast and checks 2024-08-29 15:49:33 +02:00
akallabeth
47e40dd7a5 [warnings] fix clang-tidy issues in channels 2024-08-29 15:34:25 +02:00
akallabeth
9c9d74e920 [warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
1d33095500 [warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
James Fu
0755325f77 [channels,rdpdr] fix drive redirection hotplug
Currently, after receiving PAKID_CORE_USER_LOGGEDON, the client will
switch to RDPDR_CHANNEL_STATE_USER_LOGGEDON, send Device List
Announce, then switch back to RDPDR_CHANNEL_STATE_READY.  As a result,
any drives mounted later will not be announced.
2024-07-10 17:06:47 +02:00
James Fu
75dfcabe91 [channels,rdpdr] fix state check 2024-07-09 22:54:15 +08:00
Andrey Af
5f26c013ed [server,rdpdr] fixed HashTable equal keys func 2024-06-07 10:08:46 +02:00
akallabeth
6ce8bc3e98 [channels,rdpdr] remove dead code. 2024-04-21 11:00:47 +02:00
Armin Novak
2500fb7bfb [cleanup] refactor some checks 2024-04-15 12:40:01 +02:00
akallabeth
a8ce0aee29 [coverity] 1543213 Dereference before null check 2024-04-12 12:41:42 +02:00
akallabeth
8c580e6d6d [coverity] 1543073 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
e63d4666a0 [coverity] 1543273 Resource Leak 2024-04-12 09:45:09 +02:00
akallabeth
80f85cdd55 [coverity] 1543238 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 2024-02-15 11:49:16 +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
Vic Lee
5559e59f40 [channels] Add synchronous static channel setting. 2024-02-01 15:06:23 +01:00
Armin Novak
731e1f183d [channel,rdpds] ignore XPS device messages
if FreeRDP_IgnoreInvalidDevices is set ignore XPS messages for unknown
devices
2023-12-06 15:22:59 +01:00
Armin Novak
303c477c06 [channels,rdpdr] fix #9610
windows RDP server randomly sends PAKID_CORE_SERVER_CAPABILITY to
reinitialize the rdpdr channel. Allow this message in all following
states.
2023-12-06 15:22:59 +01:00
akallabeth
eb445f7c43 [channels] make settings opaque 2023-11-24 14:54:56 +01:00
LucasMou
412c5c4ba6 fix abnormal exit: when removing the USB flash drive, the program abnormal exit 2023-11-15 10:46:42 +01:00
Armin Novak
e7f8c05bb6 [channel,rdpdr] relax state checks
ClientID confirm message might be sent async to userloggedon. So allow
these messages to arrive in any order
2023-11-09 10:12:16 +01:00
Armin Novak
43fc6bbfdc [channel,rdpdr] use server general caps
* read server CAP_GENERAL_TYPE
* check if messages are allowed according to caps
2023-11-09 10:12:16 +01:00
Armin Novak
9e361b613d [channels,rdpdr] fix user loggedon handling
PAKID_CORE_USER_LOGGEDON might happen in quite a lot of combinations not
obvious from the spec at first glance. Relax state checks so that all
valid combinations are allowed.
2023-11-02 11:21:32 +01:00
akallabeth
bb5345c60e [freerdp,api] add FREERDP_ENTRY_POINT
C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
2023-08-25 14:36:05 +02:00
akallabeth
bd7f0ecd24 [collections] fix ListDictionary usage 2023-07-05 08:46:00 +02:00
akallabeth
e03b6596c6 [build] fix unused but set variable warnings 2023-06-29 18:34:51 +02:00