Armin Novak
5c510af477
[c23,freerdp] replace NULL with nullptr
2026-02-26 15:06:27 +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
akallabeth
b86369beb7
[core,tcp] fix freerdp_tcp_connect_timeout size type
2026-01-16 13:47:25 +01:00
akallabeth
ceb0dc7440
[c,printf] fix wlog format string to match arguments
2026-01-16 11:41:53 +01:00
akallabeth
4819742644
[core,tcp] freerdp_host_connect fix double free
...
let freerdp_host_connect clean up resources, get_next_addrinfo only
flags success or error
2026-01-09 11:56:04 +01:00
akallabeth
a46d813ca9
[core,tcp] fix freerdp_vsock_connect socket leaks
2026-01-09 11:56:01 +01:00
Ondrej Holy
72585691fd
[core,tcp] Fix PreferIPv6OverIPv4 fallback to IPv4 addresses
...
Currently, when the `FreeRDP_PreferIPv6OverIPv4` option is `TRUE` and
the `getaddrinfo` function returns IPv4 addresses before IPv6 addresses,
the code tries all IPv6 addresses, but it doesn't try any IPv4 address.
This happens because the `get_next_addrinfo` function skips to the first
IPv6 address, but never goes back to try IPv4 addresses that appeared
earlier in the list. Let's fix this by reordering the address list
first when the `PreferIPv6OverIPv4` option is `TRUE`.
Co-Authored-By: Claude <noreply@anthropic.com >
Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Ondrej Holy
0bdd8da099
[core,tcp] Don't ignore connect errors
...
The `freerdp_tcp_connect_timeout` function doesn't fail currently in the
case of connection failure (e.g. destination unreachable). It fails only
in the case of the `WSAECONNRESET` error. That seems to be regression from
the refactoring made by commit e6c23cb5 . Let's use again the recommended
`getsockopt` function with the `SO_ERROR` argument to check for errors and
fail for all kinds of errors. The nice side-effect is that FreeRDP now
fails with "Failed to connect" instead of "Broken pipe" error.
Co-Authored-By: Claude <noreply@anthropic.com >
Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Ondrej Holy
bd67348eb3
[core,tcp] Try next DNS entry on connect failure
...
FreeRDP still fails to connect when first DNS entry is unreachable. The
commit 4286a4c doesn't fix that unfortunately. It tries to create a socket
for all DNS entries until the socket is created, but it doesn't verify
that it is actually possible to connect to that socket. Let's call also
the `freerdp_tcp_connect_timeout` function for all the entries until success.
Co-Authored-By: Claude <noreply@anthropic.com >
Related: https://github.com/FreeRDP/FreeRDP/issues/5335
2026-01-08 16:36:37 +01:00
Armin Novak
e65d488a51
[core,tcp] refactor freerdp_tcp_default_connect
2026-01-08 16:36:37 +01:00
Armin Novak
8ba3babc09
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:40 +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
akallabeth
3cfcb4c9ca
[core,tcp] fix a regression
...
with 2e5de43564 a bug was introduced
disabling the TCP buffering. revert that.
2025-10-06 18:59:46 +02:00
akallabeth
2e5de43564
[core,tcp] unify setting of TCP_NODELAY
2025-09-12 09:59:30 +02:00
akallabeth
ed90a55adf
[core] fix BIO_puts implementations
...
* return -2 if not implemented
* add length sanitizion checks
2025-09-01 09:03:10 +02:00
Armin Novak
e723f8db07
[core,proxy] fix BIO read/write methods
...
Introduced with ae05778644 the return of
BIO_read and BIO_write changed.
Revert this to original behaviour and fix a bug in the proxy code
2025-07-11 13:32:20 +02: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
74cd8d8fe0
[freerdp,warnings] fix -Wunused-parameter
2025-02-13 15:53:54 +01:00
akallabeth
4538cefd74
[warnings] remove dead code
2025-02-04 14:55:46 +01:00
akallabeth
f16a324598
[core,tcp] fix missing socket return check
2025-01-08 00:07:32 +01:00
akallabeth
39a62cd0cf
[core,tcp] fix integer cast
2025-01-07 10:15:52 +01:00
akallabeth
cc934795e4
[warnings] fix integer casting
...
* use asserting casts to detect overflows or sign conversions
* code cleanup for issues uncovered by casts
2025-01-01 12:58:34 +01:00
Armin Novak
a1ba364d47
[core,tcp] check arguments
...
transport_bio_buffered_write arguments require more detailed checks.
2024-12-10 11:40:04 +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
akallabeth
78acedb40e
[warnigns] fix Wshorten-64-to-32
2024-11-11 10:22:37 +01:00
akallabeth
4ec28e1f82
[warnings] fix -Wimplicit-int-conversion
2024-10-31 11:42:29 +01:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle
2024-09-16 08:22:31 +02:00
akallabeth
94020c183c
[return checks] fix use of ResetEvent
2024-09-16 06:48:09 +02:00
akallabeth
a1cef8dd85
[warnings] silence and fix unused results
2024-09-14 21:29:28 +02:00
akallabeth
7ebefc505f
[warnings] fix some msbuild warnings
2024-09-12 13:32:41 +02:00
Vic Lee
ae05778644
[core,transport] add new transport io layer design and support custom socket.
2024-09-05 20:59:21 +08:00
akallabeth
bd637c6cd1
[warnings] fix various clang-tidy warnings
2024-08-29 17:13:50 +02:00
akallabeth
36c3184a0f
[warnings] fix clang-tidy issues in libfreerdp
2024-08-29 15:34:22 +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
akallabeth
4286a4c164
[core,tcp] retry all DNS entries until success
...
When resolving some DNS name with getaddrinfo try all returned entries
matching the configuration (IPv4|IPv6|any) until the socket can be
connected. Fixes #5335
2024-08-20 13:10:12 +02:00
akallabeth
ab39072ce9
[core,tcp] fix memory leak
2024-07-01 11:07:39 +02:00
akallabeth
562fa8a03d
[core,tcp] Improve IPv4 or IPv6 connect
...
* Fix +ipv6 option, now fall back to IPv4 if no IPv6 entry found
* Add new option ForceIPvX to fail connect if no such entry is found
2024-06-28 09:07:33 +02:00
Armin Novak
c4fe6e78e5
[core,tcp] return errno ETIMEDOUT on timeout
...
BIO_C_WAIT_READ and BIO_C_WAIT_WRITE now set errno = ETIMEDOUT
if a timeout occurred.
2024-06-24 10:45:12 +02: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
2fffcd64b9
[winpr] use winpr_strerror instead of strerror
...
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
Stefan Heinzel
52606929fb
5726 add vsock support for client and server
2023-11-29 15:12:51 +01:00
akallabeth
cd4d77af86
[settings] add deprecation warnings
...
direct struct access to rdpSettings now produces warnings if not
explicitly deactiaved by defining FREERDP_SETTINGS_INTERNAL_USE
2023-11-24 14:54:56 +01:00
akallabeth
1163cc4d5c
[core] add internal settings.h include
2023-11-24 14:54:56 +01:00
Armin Novak
05c8a96fff
[core,tcp] fix transport_bio_buffered_write
...
If the return value is <= 0 do not increment the buffer data.
2023-02-02 08:12:39 +01:00
akallabeth
82ba9ede9c
[freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers
2023-01-10 17:38:00 +01:00
fifthdegree
85f7cb8916
clear openssl error queue after nla_client_begin
2022-07-02 16:32:50 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +02:00
Marek Vasut
c5bca8bbbb
transport: Set server socket as keepalive in transport_default_attach()
...
Set the same keepalive properties to accepted server socket as are set
to client sockets. This prevents the server from keeping sockets open
for tens of minutes in case the client disappears.
Signed-off-by: Marek Vasut <marex@denx.de >
2022-05-06 12:31:35 +02:00
Armin Novak
2ad18aa809
BIO ctrl cleanups
2022-04-25 16:08:48 +02:00