498 Commits

Author SHA1 Message Date
Armin Novak
b724ba546d [checks,return] fix various unchecked return values 2026-03-03 09:40:27 +01:00
Armin Novak
9de3eaa037 [server,proxy] add return checks 2026-03-02 18:32:38 +01:00
Armin Novak
56f4337220 [server] Check WTSRegisterWtsApiFunctionTable return 2026-03-02 16:19:17 +01:00
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +01:00
Armin Novak
0f46216a24 [winpr,ssl] check winpr_InitializeSSL return 2026-03-02 11:21:21 +01:00
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
Armin Novak
fc6f76d23b [server,proxy] expect element to be NULL
channel_stop_and_wait might be called with incompletely allocated
elements. Assume each member of the struct might be NULL
2026-03-02 09:57:03 +01:00
Armin Novak
cc5f1bbb82 [server,proxy] check for nullptr before using scard_call_context
* Make smartcard_call_cancel_all_context return FALSE if a NULL context
  is supplied.

* Do not call smartcard_call_context_signal_stop if the context is NULL
2026-03-02 09:45:27 +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
0445ed6734 [winpr,pubsub] check return of PubSub_Subscribe 2026-02-27 15:52:32 +01:00
Armin Novak
89ab3c6c1b [nodiscard] Fix all winpr_RAND usages
* Check return value and act on it.
* Initialize arrays that were missed before.
2026-02-27 15:52:26 +01:00
Armin Novak
e5816d65ce [c23,server] replace NULL with nullptr 2026-02-26 14:34:11 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +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
3fcc287b16 [warnings] initialize all va_list 2026-02-25 07:41:39 +01:00
akallabeth
6598081863 Merge pull request #12326 from akallabeth/server-attr-nodiscard
[server] add WINPR_ATTR_NODISCARD macro
2026-02-24 11:16:27 +01:00
akallabeth
196b659621 Merge pull request #12342 from akallabeth/proxy-no-threadpool
[server,proxy] use default threadpool
2026-02-24 11:15:03 +01:00
akallabeth
b2f325251a [server] add WINPR_ATTR_NODISCARD macro 2026-02-24 11:03:46 +01:00
Armin Novak
9dc3e9fbe4 [server,proxy] clone user/doman/password
add missing elements of struct to copy
2026-02-20 15:32:25 +01:00
Armin Novak
e6172762aa [server,proxy] use default threadpool
Do not create a threadpool per smartcard channel instance. This is
overkill and does not really improve performance, just wastes resources.
2026-02-20 11:02:34 +01:00
Armin Novak
56d6c97a41 [proxy,modules] mark functions [[nodiscard]] 2026-02-19 08:57:50 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
Armin Novak
a1c72a2f85 [server,warnings] properly handle function return 2026-02-16 09:18:39 +01:00
Armin Novak
9d199a9735 [freerdp,server] mark function pointers [[nodiscard]] 2026-02-16 09:18:35 +01:00
akallabeth
460ca149f2 [server] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:22:30 +01:00
akallabeth
fb8efd45f2 [c,format] fix format string and review warnings 2026-01-16 13:36:14 +01:00
akallabeth
432408213a [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:36 +01:00
akallabeth
9105e9659e [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:34 +01:00
akallabeth
19cccd03bf [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:31 +01:00
akallabeth
e0484bcd40 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:29 +01:00
Armin Novak
4fe941ee66 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:43 +01:00
Armin Novak
60fffc91e1 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:43 +01:00
Armin Novak
371da1cd2f [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:43 +01:00
Armin Novak
54f419c1b7 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:43 +01:00
Eric
aba17d0cf9 [server,proxy] make peer_list access thread-safe and fix leaks 2026-01-08 14:46:28 +08:00
Armin Novak
65a7a5ee01 [server,proxy] refactor pf_context_create_client_context 2026-01-07 15:42:57 +01:00
Armin Novak
e7704bdd7c [server,proxy] fix channelTracker_update return values 2026-01-07 15:40:21 +01:00
akallabeth
f1f8ec2a7e [server,proxy] fix config free 2025-12-29 18:51:28 +01:00
Armin Novak
7ccb5994c0 [c++] replace std::lock_guard with std::scoped_lock 2025-12-03 15:10:56 +01:00
akallabeth
74a3a7695c [cmake,pkg-config] properly set requires fields 2025-09-21 19:07:16 +02:00
akallabeth
a279a145df [server,proxy] check file exists before library load
To avoid spamming the log with errors check if the file exists (and log
at debug level)
2025-09-12 10:05:06 +02:00
akallabeth
919a569d56 [server,proxy] eliminate unused variable 2025-09-12 09:59:56 +02:00
akallabeth
eb793be9d3 [proxy,modules] extend dynamic module loader
Expect different naming schemes, so try all configurations.
2025-09-11 21:42:39 +02:00
Armin Novak
d355082c32 [cmake] static build: populate private
in pkg-config files only add Requires.private and Libs.private if we
build a static library.
2025-09-11 10:59:26 +02:00
Armin Novak
b84c15e8b6 [proxy,modules] fix entry point for dyn-channel-dump 2025-09-11 07:16:34 +02:00
Armin Novak
a7b7474742 [proxy,modules] generate pkg-config files for modules 2025-09-11 07:16:23 +02:00
Armin Novak
2d7bf81397 [proxy,channels] better NULL checks 2025-09-04 10:54:30 +02:00
akallabeth
343d270c5a [proxy,channels] fix unused parameter warning 2025-09-01 09:18:48 +02:00
akallabeth
2dd38aaeef [proxy,channels] drop drdynvc packets not tracked
When receiving dynamic channel packets that do not belong to an open
channel drop the packet.
2025-08-25 16:26:51 +02:00