348 Commits

Author SHA1 Message Date
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +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
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
akallabeth
d60045ae1a [chanels,various] fix VirtualChannelEntryEx parameter types 2026-01-13 17:11:27 +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
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
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
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
ba8fd2ada5 [cmake] force configuration options
limit multiconfiguration options to supported types
2024-12-05 09:36:23 +01:00
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
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
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
cc6850bf21 [warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +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