Commit Graph

504 Commits

Author SHA1 Message Date
Armin Novak
b909b0cf1c [channels] Check HashTable_SetHashFunction return 2026-03-02 16:30:35 +01:00
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +01:00
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +01:00
Armin Novak
2c0c55dc46 [c23,channels] replace NULL with nullptr 2026-02-26 13:43:54 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
76d6e7755c [channels,rdpdr] fix return value type mismatch 2026-02-25 11:51:12 +01:00
Armin Novak
f14096d468 [channels] mark functions [[nodiscard]] 2026-02-24 11:31:57 +01:00
Armin Novak
5f10ae9599 [channels,rdpdr] fix IRP handling
* clean up IRP creation
* Properly handle each IRP, call irp->Complete or irp->Discard only once
  for each IRP
* For each channel split IRP handling, one function prepares the data
  and a single evaluate function later calls irp->Complete or irp->Discard
2026-02-17 16:38:31 +01:00
Armin Novak
bf99266c2e [channels,warnings] properly handle function return 2026-02-16 09:18:38 +01:00
Armin Novak
775ee2615a [freerdp,channels] mark function pointers [[nodiscard]] 2026-02-16 09:18:34 +01:00
akallabeth
eb83f339b4 [channels,rdpdr] flag definition and stringify
* Use a enum to define RDPDR_DTYP_* constants
* Add public API freerdp_device_type_string for stringify
* Add WINPR_ATTR_NODISCARD in rdpdr_utils.h
2026-01-25 09:15:05 +01:00
akallabeth
fb8efd45f2 [c,format] fix format string and review warnings 2026-01-16 13:36:14 +01:00
akallabeth
ce22d2b43f [c,printf] fix wlog format string to match arguments 2026-01-16 11:39:49 +01:00
Armin Novak
8a101e861a [channels,rdpdr] add some checks for server side parser
Fix warnings and checks in rdpdr_server_read_general_capability_set
2026-01-15 13:05:23 +01:00
akallabeth
d60045ae1a [chanels,various] fix VirtualChannelEntryEx parameter types 2026-01-13 17:11:27 +01:00
Armin Novak
af31856078 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:33 +01:00
akallabeth
9e32181a54 [channels,rdpdr] FILE_DIRECTORY_INFORMATION::FileName as WCHAR 2025-12-12 19:26:52 +01:00
akallabeth
b160ea80e8 [mingw] fix type incompatibilities
The integer types with MINGW do not always match. Ensure the correct
32bit interger base type is used when passing pointers
2025-12-12 19:09:30 +01:00
Armin Novak
4707b465cd [warnings] eliminate unused 2025-08-20 11:54:28 +02:00
akallabeth
65f18983ed [warnings] Fix format string errors
* Fix casts of format string arguments (%p requires void*)
* Fix format string to match type of arguments
2025-08-13 15:09:48 +02:00
akallabeth
3dee8895ec [rdpdr,hotplug] fix passing of device::Id back to caller 2025-05-22 11:17:21 +02:00
Armin Novak
24ea6414bc [warnings] fix various compile warnings 2025-05-21 11:05:10 +02:00
Armin Novak
f5924a6556 [channels,rdpdr] expose device add/remove/hotplug
* Add RdpdrClientContext to OnChannelConnectedEventHandler
* Expose device register/unregister in RdpdrClientContext
* Expose device hotplug poll function in RdpdrClientContext
2025-05-12 17:27:07 +02:00
akallabeth
06564e4bc2 [core,settings] fix freerdp_device_collection_add
* Assert usage of DeviceArray, ensure returned values are != NULL if
  within DeviceCount
* Only reset newly allocated DeviceArray members on resize
2025-04-25 10:21:37 +02:00
akallabeth
b24d13a825 [channels,rdpdr] improve logging
* remove error logging in success path
* downgrade non fatal errror message to warning
2025-04-11 10:16:39 +02:00
akallabeth
7939a44ce5 [channels,rdpdr] relax state checks for PAKID_CORE_CLIENTID_CONFIRM
This missage might be sent before PAKID_CORE_SERVER_CAPABILITY by some
servers. Do accept these.
2025-03-28 09:21:27 +01:00
Armin Novak
f67e3ca7db [channels,rdpdr] improve log message format 2025-03-26 16:58:11 +01:00
akallabeth
2fb216a198 [channels,rdpdr] replace deprecated mac os API 2025-03-21 11:41:46 +01:00
akallabeth
1a5ba989e8 [warnings] fixed integer casts 2025-03-11 17:23:58 +01:00
Michael Tokarev
19f129654e spelling: dont 2025-03-06 13:24:29 +03:00
akallabeth
44d5461cd5 [warnings] fix -Wunused-but-set-variable 2025-03-06 07:15:20 +01:00
akallabeth
5386c7b83c [channels,rdpdr] more logging in server channel 2025-03-05 23:51:33 +01:00
akallabeth
f5c5b98284 [channels,rdpdr] add server side logging 2025-03-05 23:49:01 +01:00
Armin Novak
bf5d672766 [channels,rdpdr] clone key values for device list
the supplied key value might be allocated on stack, so create a copy
that is valid as long as the entry.
2025-03-05 16:54:40 +01:00
Armin Novak
420cb16012 [ci,alt-arch] deactivate armv6 build
The builder fails for unknown reasons with illegal instruction.
Filed an upstream bug report at
https://github.com/uraimo/run-on-arch-action/issues/162 waiting for
a fix.
2025-03-05 16:54:40 +01:00
akallabeth
d4f7fb081b [warnings] fix -Wunused-function
* delete unused functions that are no longer required
* define guard functions only used while debugging
2025-02-27 19:29:46 +01:00
akallabeth
856dd96312 [channel,rdpdr] support general caps V1
[MS-RDPEFS] 2.2.2.7.1 General Capability Set (GENERAL_CAPS_SET) requires
that the SpecialTypeDeviceCap element is not available if the version is
GENERAL_CAPABILITY_VERSION_01
2025-02-18 18:40:01 +01:00
akallabeth
2b7d7356c1 [channels,warnings] fix -Wunused-parameter 2025-02-13 15:53:56 +01:00
akallabeth
e7d50d7a70 [channels,rdpdr] handle NULL in rdpdr equal 2025-02-06 11:03:04 +01:00
akallabeth
5fb9f71b3b [channels,rdpdr] fix int narrowing cast 2025-01-07 21:28:13 +01:00
akallabeth
3092313d49 [channes,rdpdr] use NTSTATUS for IoStatus
the IoStatus will hold NTSTATUS values but is defined unsigned in
[MS-RDPEFS] whereas NTSTATUS is defined as signed integer. Ignore the
spec here and just treat it as signed (eliminates warnings and twos
complement will ensure the values are equal in bit representation)
2025-01-07 10:11:21 +01:00
akallabeth
4030eafd15 [channels,rdpdr] fix stream_write sign 2024-12-29 10:23:23 +01:00
akallabeth
be3ba1c425 [warnings,channels] fix integer casts 2024-12-25 13:29:07 +01:00
akallabeth
ac9cf26bce [cmake] fix define_channel_options
* fix usage of default value
* fix defaults of channels
* unify to single CMake function define_channel_options
2024-12-17 16:29:32 +01:00
akallabeth
91ae892f91 [winpr,sysinfo] fix use of GetComputerNameExA
The buffer must be large enough to hold MAX_COMPUTERNAME_LENGTH
characters, so the buffer needs to be of size MAX_COMPUTERNAME_LENGTH +
1 or larger to hold the '\0' terminated string.
2024-12-16 17:11:54 +01:00
akallabeth
e375556d07 [winpr,sysinfo] fix GetComputerNameA
* Trunctate to at most MAX_COMPUTERNAME_LENGTH characters
* Fix usage of function
2024-12-15 18:09:15 +01:00
akallabeth
344841714c Merge pull request #10844 from akallabeth/cmake-mulitconfig
Cmake multiconfig
2024-12-07 17:43:05 +01:00
akallabeth
83f2f21ad3 [warnigns] fix lots of bugprone warnings
* update-settings-tests: properly cast types in getter/setter
* wtypes: fix PHANDLE definition
* wStream: fix INT64 write function warnings
* Simplify HANDLE copy in channels, just assign after proper cast
2024-12-06 09:15:48 +01:00