Commit Graph

219 Commits

Author SHA1 Message Date
Armin Novak
2d2541119b [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:43 +01:00
Armin Novak
5c63f0e17b [server,sample] initialize struct as array
avoid gcc >= 15 and clang nonstring warnings
2026-01-08 09:45:33 +01:00
akallabeth
12d0e491f6 [cmake] add installWithRPATH
this new CMake function installs a target to a destination and adds the
correct relative RPATH to some desired locations
2025-07-17 13:59:51 +02:00
akallabeth
2fb2e5f9c5 [crypto,key] add function to export PEM and create a key
* freerdp_key_generate creates a new key
* freerdp_key_get_pem exports the key as PEM
2025-04-22 12:00:40 +02:00
akallabeth
f708f90937 [server,sample] implement relative mouse event
* implement callbacks for relative mouse input events
* optimize drawing:
  * only send drawing rectangle for current cursor position (background
    image data) and then the current cursor
2025-04-10 19:47:16 +02:00
akallabeth
6af01d9b89 [server,sample] do not wait for channelHandle
If we wait for channelHandle events before calling
WTSVirtualChannelManagerCheckFileDescriptor we will never open the
drdynvc channel.
2025-04-10 19:06:31 +02:00
akallabeth
44d5461cd5 [warnings] fix -Wunused-but-set-variable 2025-03-06 07:15:20 +01:00
akallabeth
652d5299e7 [server,warnings] fix -Wunused-parameter for sample 2025-02-13 15:54:13 +01:00
akallabeth
26eac974fe [warnings] fix integer casting
* use WINPR_ASSERTING_INT_CAST where possible
 * fix a few inconsistencies
2024-12-19 12:33:42 +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
a3aa01214c [resource root] unify locations
unify resource locations in case WITH_BINARY_VERSIONING is set.
2024-10-25 11:40:40 +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
bb242b9a89 [return checks] fix use of WaitForSingleObject 2024-09-16 08:22:37 +02:00
akallabeth
965d231e49 [return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
c0d06c782b [return checks] fix missing checks
* Stream_EnsureRemainingCapacity
* rdp_client_transition_to_state
2024-09-16 06:48:19 +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
cc6850bf21 [warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +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
1d33095500 [warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
9b6e39a880 [server,sample] fix NSCodec and SurfaceBitsCommand 2024-07-24 21:54:49 +02:00
Armin Novak
557844277f [server,sample] use RFX RLGR from settings 2024-07-24 21:54:33 +02:00
akallabeth
b4fb4161d9 [coverity] 1088726 Resource leak 2024-04-11 12:04:07 +02:00
akallabeth
678ff144ab [cmake] unify windows resource file generation
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +01:00
akallabeth
05e555feb7 fixed unused-variable warnings 2024-02-22 12:31:50 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +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
bf72c307b0 [server,sample] add bounds checks
* test_peer_draw_icon should ignore requests if the resulting image is
  out of bounds of desktop size.
2024-02-12 17:01:16 +01:00
akallabeth
53d88c1c96 [server,sample] delay WTSVirtualChannelManagerCheckFileDescriptor
Only call WTSVirtualChannelManagerCheckFileDescriptor if there was a
event pending on WTSVirtualChannelManagerGetEventHandle
This ensures that the drdynvc channel is not opened before it is
initialized.
2024-02-12 14:06:51 +01:00
akallabeth
e8d1bc5f4b [server,sample] fix resource location
if binary versioning is enabled the installation path was wrong.
2024-02-08 09:47:56 +01:00
akallabeth
0cea2461c1 [server,sample] use wImage to load cursor icon
replace the custom PPM loader with the winpr_image* family of functions.
2024-02-07 13:14:02 +01:00
akallabeth
eb8b2828dc [server,sample] provide sample-icons formats
provide the cursor icon in different formats.
2024-02-07 13:14:02 +01:00
Armin Novak
175a3ca09a [cmake] do not append EXECUTABLE_SUFFIX to OUTPUT_NAME 2023-12-22 15:37:56 +01:00
Armin Novak
b04271ae2d [cmake] add executable versioning
optionally append API version to generated binaries
2023-12-21 18:56:51 +01:00
akallabeth
6b9245849c [warnings] type casts 2023-11-24 18:19:03 +01:00
akallabeth
1f236ade7a [server] make settings opaque 2023-11-24 14:54:56 +01:00
Armin Novak
c91a250623 [warnings] add WINPR_FORMAT_ARG
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
akallabeth
4e824b243f [winpr] add WINPR_ATTR_FORMAT_ARG
this macro declares the function argument (pos,arg) to be a printf
style format string and enables compiler checks for that.
2023-08-25 12:56:36 +02:00
akallabeth
41bd8bd3fb [various] fix integer conversions 2023-08-04 15:07:56 +02:00
Armin Novak
5b27ada80a [server,sample] fix unused result warnings 2023-07-31 08:32:43 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
akallabeth
105f0d2366 [channel,audin] move common code to server channel
* manage channel related callbacks with default implementations
* use dynamic logger for server audin channel
2023-05-17 13:33:35 +02:00
Pascal Nowack
c5278c874f channels/audin: Rework API to be closer to documentation
The current server side channel handling of AUDIO_INPUT is currently
very constrained:

- Server implementations cannot measure the clients uplink, since the
  Incoming Data PDU is currently unhandled and FreeRDPs DSP handling
  delays the callback call of ReceiveSamples
- Servers currently cannot prefer a different protocol version
- Servers currently cannot change the used format

To solve these issues without running into the risk that some
simplifications constraint certain API usage, rework the current channel
handling to be very close to the documentation.
This means, that all documented API calls can be made by server
implementations and all documented PDUs, that the server side is
expected to receive are just parsed inside FreeRDP and then forwarded to
the API implementation.
2023-05-17 13:33:35 +02:00
Armin Novak
16a78e07dd [server,sample] move assert in SuppressOutput
if allowDisplayUpdates == 0 no area rectangle is available.
2023-05-15 22:42:05 +02:00
akallabeth
516668d02b [fclose] ensure no invalid pointers are passed.
fclose has undefined behaviour for NULL pointers, so check for these.
2023-04-28 07:39:35 +02:00