feat: S12.17 tunable + runtime-overridable TCP connect and TLS handshake timeouts#447
Conversation
Adds SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS / _TLS_HANDSHAKE_TIMEOUT_MS tunables and the SolidSyslogTcpConnectTimeoutFunction callback typedef. PosixTcpStream gains a config struct carrying GetConnectTimeoutMs + context; the getter is invoked per Open so commissioning-time or live tuning takes effect without rebuilding or recreating the stream. NULL config (or NULL getter field) falls back to a TU-private Null Object returning the tunable — single code path through the bounded select() wait. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the POSIX shape: SolidSyslogWinsockTcpStreamConfig carries GetConnectTimeoutMs + context; default DefaultWinsockTcpStream static holds the Null Object getter so a NULL config flows through the same bounded select() path as a configured one. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors POSIX/Winsock: SolidSyslogFreeRtosTcpStreamConfig with GetConnectTimeoutMs + context, DefaultFreeRtosTcpStream static, Null Object substitution. The bounded SO_RCVTIMEO/SO_SNDTIMEO ticks now come from pdMS_TO_TICKS(ResolveConnectTimeoutMs(self)) so commissioning or live-tuning takes effect on the next connect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds SolidSyslogTlsHandshakeTimeoutFunction typedef header, extends SolidSyslogTlsStreamConfig with GetHandshakeTimeoutMs + context, and substitutes a Null Object in Initialise when the integrator does not install a getter. The bounded handshake retry budget now resolves from the getter at the start of each handshake attempt so commissioning or live-tuning takes effect on the next reconnect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the OpenSSL TlsStream pattern: SolidSyslogMbedTlsStreamConfig gains GetHandshakeTimeoutMs + context, Null Object substituted in Initialise when not supplied. The bounded handshake retry budget now resolves from the getter at the start of each handshake attempt so commissioning or live-tuning takes effect on the next reconnect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- C++ tests use nullptr in Create() calls (modernize-use-nullptr) - NOLINT bugprone-easily-swappable-parameters on PosixTcpStream's WaitForConnectCompletion(int fd, long timeoutMicros) - NOLINT cppcoreguidelines-pro-type-reinterpret-cast on the test fakes' sentinel-pointer Reset - Include <stddef.h> in BddTargetTlsSender_OpenSsl_PosixTcp.c for NULL Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 31 minutes and 59 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR implements tunable and runtime-overridable TCP connect and TLS handshake timeouts across five backend implementations (POSIX, Windows, FreeRtos, OpenSSL, MbedTLS), replacing hardcoded timeout constants with config-driven getter callbacks that support per-instance and live-tuning configuration. ChangesCore contract types and tunables
TCP stream backends
TLS stream backends
Caller updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1336 passed) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Tests/SolidSyslogWinsockTcpStreamTest.cpp (1)
270-276:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDerive the expected timeout from the tunable macro.
Line 274 hard-codes the default
200 ms, so this test will false-fail in any build that overridesSOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MSvia the user tunables hook. Assert against the macro instead of the default literal.💡 Proposed fix
TEST(SolidSyslogWinsockTcpStream, OpenPassesBoundedConnectTimeoutToSelect) { WinsockFake_SetConnectFailsWithLastError(WSAEWOULDBLOCK); SolidSyslogStream_Open(stream, addr); - /* Default tunable SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS = 200 → 0 s + 200 000 µs. */ - LONGS_EQUAL(0, WinsockFake_LastSelectTimeoutSec()); - LONGS_EQUAL(200000, WinsockFake_LastSelectTimeoutUsec()); + LONGS_EQUAL( + (long) (SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS / 1000U), + WinsockFake_LastSelectTimeoutSec() + ); + LONGS_EQUAL( + (long) ((SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS % 1000U) * 1000U), + WinsockFake_LastSelectTimeoutUsec() + ); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/SolidSyslogWinsockTcpStreamTest.cpp` around lines 270 - 276, The test TEST(SolidSyslogWinsockTcpStream, OpenPassesBoundedConnectTimeoutToSelect) currently asserts a hard-coded 200 ms value; change it to derive the expected timeout from the tunable macro SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS instead: compute expected usec as (SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS * 1000) and assert that WinsockFake_LastSelectTimeoutSec() is 0 and WinsockFake_LastSelectTimeoutUsec() equals that computed value after calling WinsockFake_SetConnectFailsWithLastError(WSAEWOULDBLOCK) and SolidSyslogStream_Open(stream, addr).
🧹 Nitpick comments (6)
Tests/SolidSyslogWinsockTcpStreamTest.cpp (1)
109-122: ⚡ Quick winAdd one non-null
ConnectTimeoutContexttest path.Line 116 only builds a getter-only config, so the new context field never gets exercised. A dropped copy/forward of
ConnectTimeoutContextwould still pass this file today.💡 Suggested extension
- void OpenStreamWithFakeGetter() + void OpenStreamWithFakeGetter(void* context = nullptr) { SolidSyslogWinsockTcpStream_Destroy(stream); struct SolidSyslogWinsockTcpStreamConfig config = {}; config.GetConnectTimeoutMs = FakeGetConnectTimeoutMs; + config.ConnectTimeoutContext = context; stream = SolidSyslogWinsockTcpStream_Create(&config); WinsockFake_SetConnectFailsWithLastError(WSAEWOULDBLOCK); SolidSyslogStream_Open(stream, addr); }+TEST(SolidSyslogWinsockTcpStream, GetterReceivesConfiguredContext) +{ + void* testContext = reinterpret_cast<void*>(0x1234U); + + OpenStreamWithFakeGetter(testContext); + + POINTERS_EQUAL(testContext, FakeGetConnectTimeoutMs_LastContext); +}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/SolidSyslogWinsockTcpStreamTest.cpp` around lines 109 - 122, The test OpenStreamWithFakeGetter builds a config with GetConnectTimeoutMs but never sets ConnectTimeoutContext, so add a non-null ConnectTimeoutContext to exercise the context path: in OpenStreamWithFakeGetter, after setting config.GetConnectTimeoutMs = FakeGetConnectTimeoutMs, set config.ConnectTimeoutContext to a pointer to a test-local context object (e.g. &fakeConnectTimeoutContext) that the FakeGetConnectTimeoutMs recognizes, ensuring the fake getter and SolidSyslogWinsockTcpStream_Create are invoked with a non-null ConnectTimeoutContext.Platform/MbedTls/Source/SolidSyslogMbedTlsStream.c (1)
87-90: ⚡ Quick winMove
MbedTlsStream_ResolveHandshakeTimeoutMsdirectly below its first caller.Please place this helper definition immediately beneath
MbedTlsStream_PerformHandshake(keep the forward declaration at file top) to preserve the project’s required top-down reading order.As per coding guidelines:
**/*.c: “Helper functions must be forward-declared at file top and defined immediately beneath their first caller for top-down reading”.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Platform/MbedTls/Source/SolidSyslogMbedTlsStream.c` around lines 87 - 90, The helper function MbedTlsStream_ResolveHandshakeTimeoutMs is defined too early; keep its forward declaration at the top but move the full definition so it appears immediately after its first caller MbedTlsStream_PerformHandshake; locate the MbedTlsStream_PerformHandshake implementation and cut the MbedTlsStream_ResolveHandshakeTimeoutMs definition from its current location and paste it directly beneath that function to satisfy the top-down reading order while leaving the forward declaration at the file header unchanged.Tests/SolidSyslogPosixTcpStreamTest.cpp (1)
463-468: ⚡ Quick winAdd a non-null context pass-through test for the getter.
You verify the null-context path, but not that a configured context pointer is forwarded unchanged. A small test here would lock the contract.
Suggested test shape
+TEST(SolidSyslogPosixTcpStream, GetterReceivesConfiguredContext) +{ + int marker = 42; + SolidSyslogPosixTcpStream_Destroy(stream); + struct SolidSyslogPosixTcpStreamConfig config = {}; + config.GetConnectTimeoutMs = FakeGetConnectTimeoutMs; + config.ConnectTimeoutContext = ▮ + stream = SolidSyslogPosixTcpStream_Create(&config); + + SocketFake_SetConnectFailsWithErrno(EINPROGRESS); + SolidSyslogStream_Open(stream, addr); + + POINTERS_EQUAL(&marker, FakeGetConnectTimeoutMs_LastContext); +}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/SolidSyslogPosixTcpStreamTest.cpp` around lines 463 - 468, Add a new test mirroring GetterReceivesNullContextWhenContextNotConfigured that verifies a non-null context is forwarded: create a sentinel object, register/configure the fake getter with that sentinel as its context, call OpenStreamWithFakeGetter (using the same helper used in the existing test but passing/setting the configured context), then assert POINTERS_EQUAL(sentinel, FakeGetConnectTimeoutMs_LastContext); name the test e.g. GetterForwardsNonNullContextWhenContextConfigured and perform any necessary cleanup.Platform/OpenSsl/Source/SolidSyslogTlsStream.c (1)
410-422: ⚡ Quick winMove these Initialise-only helpers under
TlsStream_Initialise.
TlsStream_NullHandshakeTimeoutGetterandTlsStream_ConfigProvidesHandshakeGetterare first used on Line 67, but their definitions live ~340 lines later. Please place them immediately beneath their first caller to keep this TU top-down per the repo C layout rule.As per coding guidelines, "Helper functions must be forward-declared at file top and defined immediately beneath their first caller for top-down reading".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Platform/OpenSsl/Source/SolidSyslogTlsStream.c` around lines 410 - 422, Forward-declare TlsStream_NullHandshakeTimeoutGetter and TlsStream_ConfigProvidesHandshakeGetter at the top of the TU, then move their full definitions so they appear immediately beneath the TlsStream_Initialise function (their first caller). Keep the signatures and static/static inline qualifiers unchanged and ensure any uses by TlsStream_Initialise still compile after relocation.Tests/SolidSyslogTlsStreamTest.cpp (1)
1107-1134: ⚡ Quick winAdd one reopen/context case for the new timeout contract.
These tests only cover a single
Openand the default-null context path. A cached handshake budget, or a dropped non-nullconfig.HandshakeTimeoutContext, would still pass. Please add one case that sets a non-null context, opens once, changes the backing timeout value, re-opens, and asserts both the updated budget and forwarded context.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/SolidSyslogTlsStreamTest.cpp` around lines 1107 - 1134, Add a new test similar to the others that verifies the non-null HandshakeTimeoutContext is forwarded on each Open and that the handshake budget is refreshed on reopen: call RecreateStreamWithFakeHandshakeGetter(), set stream->config.HandshakeTimeoutContext to a non-null pointer, set FakeGetHandshakeTimeoutMs_ReturnValue to an initial value and call SolidSyslogStream_Open(stream, addr) to consume that budget, then change FakeGetHandshakeTimeoutMs_ReturnValue to a different value and call SolidSyslogStream_Open(stream, addr) again (arrange persistent handshake error with ArrangePersistentHandshakeError(SSL_ERROR_WANT_READ) to force polling) and assert that NoOpSleepCallCount equals the new budget and that FakeGetHandshakeTimeoutMs_LastContext equals the non-null context pointer; use the existing FakeGetHandshakeTimeoutMs_* helpers and SolidSyslogStream_Open/RecreateStreamWithFakeHandshakeGetter to locate the relevant code paths.Tests/FreeRtos/SolidSyslogFreeRtosTcpStreamTest.cpp (1)
114-121: ⚡ Quick winAdd one test for configured non-null context passthrough.
The suite verifies the unconfigured (
nullptr) context path, but not that a configuredConnectTimeoutContextis forwarded to the getter.✅ Suggested patch
- void openStreamWithFakeGetter() + void openStreamWithFakeGetter(void* context = nullptr) { SolidSyslogFreeRtosTcpStream_Destroy(stream); struct SolidSyslogFreeRtosTcpStreamConfig config = {}; config.GetConnectTimeoutMs = FakeGetConnectTimeoutMs; + config.ConnectTimeoutContext = context; stream = SolidSyslogFreeRtosTcpStream_Create(&config); SolidSyslogStream_Open(stream, addr); }TEST(SolidSyslogFreeRtosTcpStream, GetterReceivesNullContextWhenContextNotConfigured) { openStreamWithFakeGetter(); POINTERS_EQUAL(nullptr, FakeGetConnectTimeoutMs_LastContext); } + +TEST(SolidSyslogFreeRtosTcpStream, GetterReceivesConfiguredContext) +{ + int contextToken = 42; + openStreamWithFakeGetter(&contextToken); + + POINTERS_EQUAL(&contextToken, FakeGetConnectTimeoutMs_LastContext); +}Also applies to: 217-222
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/FreeRtos/SolidSyslogFreeRtosTcpStreamTest.cpp` around lines 114 - 121, Add a test that configures a non-null ConnectTimeoutContext on the SolidSyslogFreeRtosTcpStreamConfig and asserts that the pointer passed into the GetConnectTimeoutMs callback (FakeGetConnectTimeoutMs) equals that configured context; update the openStreamWithFakeGetter helper (and the analogous helper at lines 217-222) to set config.ConnectTimeoutContext to a distinct non-null value before creating the stream with SolidSyslogFreeRtosTcpStream_Create and calling SolidSyslogStream_Open so the FakeGetConnectTimeoutMs can verify the passthrough.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Platform/Posix/Source/SolidSyslogPosixTcpStream.c`:
- Around line 210-214: PosixTcpStream_ResolveConnectTimeoutMicros currently
multiplies a 32-bit ms by 1000 using (long) which can overflow on 32-bit long
targets; change the computation to use a wider integer (e.g. int64_t or long
long) for the multiply, then clamp the result to the target long range and
return (long) safely. Locate the function
PosixTcpStream_ResolveConnectTimeoutMicros and replace the direct (long) ms *
1000L expression with a promotion to int64_t (or uint64_t), perform the
multiplication, cap to LONG_MAX if it exceeds the representable range, and cast
the clamped value back to long for the return so select() deadlines are not
given invalid values.
---
Outside diff comments:
In `@Tests/SolidSyslogWinsockTcpStreamTest.cpp`:
- Around line 270-276: The test TEST(SolidSyslogWinsockTcpStream,
OpenPassesBoundedConnectTimeoutToSelect) currently asserts a hard-coded 200 ms
value; change it to derive the expected timeout from the tunable macro
SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS instead: compute expected usec as
(SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS * 1000) and assert that
WinsockFake_LastSelectTimeoutSec() is 0 and WinsockFake_LastSelectTimeoutUsec()
equals that computed value after calling
WinsockFake_SetConnectFailsWithLastError(WSAEWOULDBLOCK) and
SolidSyslogStream_Open(stream, addr).
---
Nitpick comments:
In `@Platform/MbedTls/Source/SolidSyslogMbedTlsStream.c`:
- Around line 87-90: The helper function MbedTlsStream_ResolveHandshakeTimeoutMs
is defined too early; keep its forward declaration at the top but move the full
definition so it appears immediately after its first caller
MbedTlsStream_PerformHandshake; locate the MbedTlsStream_PerformHandshake
implementation and cut the MbedTlsStream_ResolveHandshakeTimeoutMs definition
from its current location and paste it directly beneath that function to satisfy
the top-down reading order while leaving the forward declaration at the file
header unchanged.
In `@Platform/OpenSsl/Source/SolidSyslogTlsStream.c`:
- Around line 410-422: Forward-declare TlsStream_NullHandshakeTimeoutGetter and
TlsStream_ConfigProvidesHandshakeGetter at the top of the TU, then move their
full definitions so they appear immediately beneath the TlsStream_Initialise
function (their first caller). Keep the signatures and static/static inline
qualifiers unchanged and ensure any uses by TlsStream_Initialise still compile
after relocation.
In `@Tests/FreeRtos/SolidSyslogFreeRtosTcpStreamTest.cpp`:
- Around line 114-121: Add a test that configures a non-null
ConnectTimeoutContext on the SolidSyslogFreeRtosTcpStreamConfig and asserts that
the pointer passed into the GetConnectTimeoutMs callback
(FakeGetConnectTimeoutMs) equals that configured context; update the
openStreamWithFakeGetter helper (and the analogous helper at lines 217-222) to
set config.ConnectTimeoutContext to a distinct non-null value before creating
the stream with SolidSyslogFreeRtosTcpStream_Create and calling
SolidSyslogStream_Open so the FakeGetConnectTimeoutMs can verify the
passthrough.
In `@Tests/SolidSyslogPosixTcpStreamTest.cpp`:
- Around line 463-468: Add a new test mirroring
GetterReceivesNullContextWhenContextNotConfigured that verifies a non-null
context is forwarded: create a sentinel object, register/configure the fake
getter with that sentinel as its context, call OpenStreamWithFakeGetter (using
the same helper used in the existing test but passing/setting the configured
context), then assert POINTERS_EQUAL(sentinel,
FakeGetConnectTimeoutMs_LastContext); name the test e.g.
GetterForwardsNonNullContextWhenContextConfigured and perform any necessary
cleanup.
In `@Tests/SolidSyslogTlsStreamTest.cpp`:
- Around line 1107-1134: Add a new test similar to the others that verifies the
non-null HandshakeTimeoutContext is forwarded on each Open and that the
handshake budget is refreshed on reopen: call
RecreateStreamWithFakeHandshakeGetter(), set
stream->config.HandshakeTimeoutContext to a non-null pointer, set
FakeGetHandshakeTimeoutMs_ReturnValue to an initial value and call
SolidSyslogStream_Open(stream, addr) to consume that budget, then change
FakeGetHandshakeTimeoutMs_ReturnValue to a different value and call
SolidSyslogStream_Open(stream, addr) again (arrange persistent handshake error
with ArrangePersistentHandshakeError(SSL_ERROR_WANT_READ) to force polling) and
assert that NoOpSleepCallCount equals the new budget and that
FakeGetHandshakeTimeoutMs_LastContext equals the non-null context pointer; use
the existing FakeGetHandshakeTimeoutMs_* helpers and
SolidSyslogStream_Open/RecreateStreamWithFakeHandshakeGetter to locate the
relevant code paths.
In `@Tests/SolidSyslogWinsockTcpStreamTest.cpp`:
- Around line 109-122: The test OpenStreamWithFakeGetter builds a config with
GetConnectTimeoutMs but never sets ConnectTimeoutContext, so add a non-null
ConnectTimeoutContext to exercise the context path: in OpenStreamWithFakeGetter,
after setting config.GetConnectTimeoutMs = FakeGetConnectTimeoutMs, set
config.ConnectTimeoutContext to a pointer to a test-local context object (e.g.
&fakeConnectTimeoutContext) that the FakeGetConnectTimeoutMs recognizes,
ensuring the fake getter and SolidSyslogWinsockTcpStream_Create are invoked with
a non-null ConnectTimeoutContext.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9290aea8-6d5b-455e-a60f-8094e60bcd77
📒 Files selected for processing (31)
Bdd/Targets/Common/BddTargetTlsSender_MbedTls_FreeRtosTcp.cBdd/Targets/Common/BddTargetTlsSender_OpenSsl_PosixTcp.cBdd/Targets/Common/BddTargetTlsSender_OpenSsl_WinsockTcp.cBdd/Targets/FreeRtos/main.cBdd/Targets/Linux/main.cBdd/Targets/Windows/BddTargetWindows.cCore/Interface/SolidSyslogTcpConnectTimeoutFunction.hCore/Interface/SolidSyslogTlsHandshakeTimeoutFunction.hCore/Interface/SolidSyslogTunablesDefaults.hPlatform/FreeRtos/Interface/SolidSyslogFreeRtosTcpStream.hPlatform/FreeRtos/Source/SolidSyslogFreeRtosTcpStream.cPlatform/FreeRtos/Source/SolidSyslogFreeRtosTcpStreamPrivate.hPlatform/FreeRtos/Source/SolidSyslogFreeRtosTcpStreamStatic.cPlatform/MbedTls/Interface/SolidSyslogMbedTlsStream.hPlatform/MbedTls/Source/SolidSyslogMbedTlsStream.cPlatform/OpenSsl/Interface/SolidSyslogTlsStream.hPlatform/OpenSsl/Source/SolidSyslogTlsStream.cPlatform/Posix/Interface/SolidSyslogPosixTcpStream.hPlatform/Posix/Source/SolidSyslogPosixTcpStream.cPlatform/Posix/Source/SolidSyslogPosixTcpStreamPrivate.hPlatform/Posix/Source/SolidSyslogPosixTcpStreamStatic.cPlatform/Windows/Interface/SolidSyslogWinsockTcpStream.hPlatform/Windows/Source/SolidSyslogWinsockTcpStream.cPlatform/Windows/Source/SolidSyslogWinsockTcpStreamPrivate.hPlatform/Windows/Source/SolidSyslogWinsockTcpStreamStatic.cTests/FreeRtos/SolidSyslogFreeRtosTcpStreamTest.cppTests/MbedTls/SolidSyslogMbedTlsStreamTest.cppTests/SolidSyslogPosixTcpStreamTest.cppTests/SolidSyslogStreamSenderTest.cppTests/SolidSyslogTlsStreamTest.cppTests/SolidSyslogWinsockTcpStreamTest.cpp
- IWYU: drop unused SolidSyslogStreamDefinition.h include from PosixTcpStream.c (private header pulls it in); add stdint.h to PosixTcpStreamTest.cpp + TlsStreamTest.cpp for uint32_t - MISRA: line-number bumps in misra_suppressions.txt for the moved cast/enum sites in PosixTcpStream/WinsockTcpStream/FreeRtosTcpStream/ TlsStream/MbedTlsStream - MISRA 8.9: move Default*TcpStream statics inside their respective Initialise functions (function-local static const) so the rule no longer trips on file-scope objects used in a single function Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1336 passed) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Closes #282.
Summary
SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS= 200,SOLIDSYSLOG_TLS_HANDSHAKE_TIMEOUT_MS= 5000) overridable viaSOLIDSYSLOG_USER_TUNABLES_FILE.SolidSyslogTcpConnectTimeoutFunction,SolidSyslogTlsHandshakeTimeoutFunction) read at use-time on every connect / handshake attempt — supports commissioning-from-NVRAM, live-tuning, and per-instance variation without rebuilding or recreating the stream.SolidSyslogPosixTcpStream,SolidSyslogWinsockTcpStream,SolidSyslogFreeRtosTcpStream,SolidSyslogTlsStream(OpenSSL),SolidSyslogMbedTlsStream.API change: TCP stream
_Create(void)→_Create(const struct ...Config*)acceptingNULLfor all-defaults. Existing callers passNULLor zeroed config (existing zero-init{}/{0}calls keep their default behavior automatically).Test plan
.c🤖 Generated with Claude Code
Summary by CodeRabbit