Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
75bf2e1
feat: S11.04 add SolidSyslogNullSd
DavidCozens May 18, 2026
047f57a
feat: S11.04 add SolidSyslogNullSender
DavidCozens May 18, 2026
4f30094
refactor: S11.04 flip SolidSyslogNullStore to Get-only
DavidCozens May 18, 2026
ab251c4
refactor: S11.04 flip SolidSyslogNullSecurityPolicy to Get-only
DavidCozens May 18, 2026
0ba5d7e
refactor: S11.04 migrate PassthroughBuffer onto PoolAllocator
DavidCozens May 18, 2026
3e6df3e
refactor: S11.04 migrate UdpSender onto PoolAllocator
DavidCozens May 18, 2026
c4a18aa
refactor: S11.04 migrate SwitchingSender onto PoolAllocator
DavidCozens May 18, 2026
138618a
refactor: S11.04 migrate MetaSd onto PoolAllocator
DavidCozens May 18, 2026
5c88a0f
refactor: S11.04 migrate TimeQualitySd onto PoolAllocator
DavidCozens May 18, 2026
dfaefc1
refactor: S11.04 migrate OriginSd onto PoolAllocator
DavidCozens May 18, 2026
248ec5a
refactor: S11.04 align _Destroy parameter naming with NAMING.md
DavidCozens May 18, 2026
47daf09
docs: update DEVLOG for S11.04
DavidCozens May 18, 2026
0cebacf
fix: S11.04 silence cppcheck redundant-init and flow-analysis warnings
DavidCozens May 18, 2026
190173b
fix: S11.04 apply IWYU include adjustments to S11.04 new files
DavidCozens May 18, 2026
79b3593
fix: S11.04 validate SwitchingSender config in _Create
DavidCozens May 18, 2026
16efd12
fix: S11.04 validate TimeQualitySd callback in _Create
DavidCozens May 18, 2026
cf9ced3
test: S11.04 restructure SwitchingSender destroy-callback tests
DavidCozens May 18, 2026
be3162b
refactor: S11.04 prefix Static.c file-scope statics per NAMING.md
DavidCozens May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Bdd/Targets/FreeRtos/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ static struct SolidSyslogResolver* resolver = NULL;
static struct SolidSyslogDatagram* datagram = NULL;
static struct SolidSyslogStream* tcpStream = NULL;
static struct SolidSyslogSender* tcpSender = NULL;
static struct SolidSyslogSender* udpSender = NULL;
static struct SolidSyslogSender* switchingSender = NULL;
static struct SolidSyslogBuffer* buffer = NULL;
static struct SolidSyslogMutex* bufferMutex = NULL;

Expand Down Expand Up @@ -631,10 +633,7 @@ static void DestroyCurrentStore(void)
SolidSyslogCrc16Policy_Destroy();
SolidSyslogFatFsFile_Destroy(storeFile);
}
else
{
SolidSyslogNullStore_Destroy();
}
/* else: NullStore is shared and immutable — nothing to destroy. */
}

/* Full teardown of every resource InteractiveTask allocated during Setup.
Expand All @@ -651,9 +650,9 @@ static void TeardownAll(void)
solidSyslogTeardown = true;
solidSyslogReady = false;
SolidSyslog_Destroy();
SolidSyslogOriginSd_Destroy();
SolidSyslogTimeQualitySd_Destroy();
SolidSyslogMetaSd_Destroy();
SolidSyslogOriginSd_Destroy(originSd);
SolidSyslogTimeQualitySd_Destroy(timeQualitySd);
SolidSyslogMetaSd_Destroy(metaSd);
SolidSyslogStdAtomicCounter_Destroy(atomicCounter);
DestroyCurrentStore();
if (fatfsMounted)
Expand All @@ -674,10 +673,10 @@ static void TeardownAll(void)
SolidSyslogFreeRtosMutex_Destroy(bufferMutex);
SolidSyslogFreeRtosMutex_Destroy(lifecycleMutex);
lifecycleMutex = NULL;
SolidSyslogSwitchingSender_Destroy();
SolidSyslogSwitchingSender_Destroy(switchingSender);
SolidSyslogStreamSender_Destroy(tcpSender);
SolidSyslogFreeRtosTcpStream_Destroy(tcpStream);
SolidSyslogUdpSender_Destroy();
SolidSyslogUdpSender_Destroy(udpSender);
SolidSyslogFreeRtosDatagram_Destroy(datagram);
SolidSyslogFreeRtosStaticResolver_Destroy(resolver);
}
Expand Down Expand Up @@ -788,7 +787,7 @@ static void InteractiveTask(void* argument)
.Endpoint = GetEndpoint,
.EndpointVersion = GetEndpointVersion,
};
struct SolidSyslogSender* udpSender = SolidSyslogUdpSender_Create(&udpConfig);
udpSender = SolidSyslogUdpSender_Create(&udpConfig);

/* Plain TCP path via the new FreeRTOS Plus-TCP stream adapter. Shares the
* UDP endpoint callbacks because the BDD oracle (syslog-ng) listens on the
Expand Down Expand Up @@ -816,7 +815,8 @@ static void InteractiveTask(void* argument)
.Selector = BddTargetSwitchConfig_Selector,
};
BddTargetSwitchConfig_SetByName("udp");
struct SolidSyslogSender* sender = SolidSyslogSwitchingSender_Create(&switchConfig);
switchingSender = SolidSyslogSwitchingSender_Create(&switchConfig);
struct SolidSyslogSender* sender = switchingSender;

/* CircularBuffer drained by ServiceTask below, with a FreeRtosMutex
* gating concurrent producers (interactive task today; multi-task
Expand All @@ -832,7 +832,7 @@ static void InteractiveTask(void* argument)

/* Default store is NullStore — flipped to FatFs/BlockStore by
* `set store file` via RebuildWithFileStore(). */
currentStore = SolidSyslogNullStore_Create();
currentStore = SolidSyslogNullStore_Get();
currentStoreIsFile = false;

atomicCounter = SolidSyslogStdAtomicCounter_Create(&atomicCounterStorage);
Expand Down
24 changes: 12 additions & 12 deletions Bdd/Targets/Linux/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static SolidSyslogPosixTcpStreamStorage plainTcpStreamStorage;
static struct SolidSyslogStream* plainTcpStream;
static SolidSyslogStreamSenderStorage plainTcpSenderStorage;
static struct SolidSyslogSender* plainTcpSender;
static struct SolidSyslogSender* udpSender;
static struct SolidSyslogSender* switchingSender;

static void GetTimeQuality(struct SolidSyslogTimeQuality* timeQuality)
{
Expand Down Expand Up @@ -83,7 +85,7 @@ static struct SolidSyslogSender* CreateSender(const struct BddTargetOptions* opt
udpConfig.Datagram = SolidSyslogPosixDatagram_Create();
udpConfig.Endpoint = BddTargetUdpConfig_GetEndpoint;
udpConfig.EndpointVersion = BddTargetUdpConfig_GetEndpointVersion;
struct SolidSyslogSender* udpSender = SolidSyslogUdpSender_Create(&udpConfig);
udpSender = SolidSyslogUdpSender_Create(&udpConfig);

plainTcpStream = SolidSyslogPosixTcpStream_Create(&plainTcpStreamStorage);
static struct SolidSyslogStreamSenderConfig tcpConfig = {0};
Expand All @@ -106,7 +108,8 @@ static struct SolidSyslogSender* CreateSender(const struct BddTargetOptions* opt
switchConfig.Selector = BddTargetSwitchConfig_Selector;

BddTargetSwitchConfig_SetByName(options->Transport);
return SolidSyslogSwitchingSender_Create(&switchConfig);
switchingSender = SolidSyslogSwitchingSender_Create(&switchConfig);
return switchingSender;
}

static enum SolidSyslogDiscardPolicy MapDiscardPolicy(const char* policy)
Expand Down Expand Up @@ -178,16 +181,16 @@ static struct SolidSyslogStore* CreateStore(const struct BddTargetOptions* optio
return SolidSyslogBlockStore_Create(&storeStorage, &storeConfig);
}

return SolidSyslogNullStore_Create();
return SolidSyslogNullStore_Get();
}

static void DestroySender(void)
{
SolidSyslogSwitchingSender_Destroy();
SolidSyslogSwitchingSender_Destroy(switchingSender);
BddTargetTlsSender_Destroy();
SolidSyslogStreamSender_Destroy(plainTcpSender);
SolidSyslogPosixTcpStream_Destroy(plainTcpStream);
SolidSyslogUdpSender_Destroy();
SolidSyslogUdpSender_Destroy(udpSender);
SolidSyslogPosixDatagram_Destroy();
SolidSyslogGetAddrInfoResolver_Destroy();
}
Expand All @@ -203,10 +206,7 @@ static void DestroyStore(struct SolidSyslogStore* store, const struct BddTargetO
SolidSyslogCrc16Policy_Destroy();
SolidSyslogPosixFile_Destroy(storeFile);
}
else
{
SolidSyslogNullStore_Destroy();
}
/* else: NullStore is shared and immutable — nothing to destroy. */
}

int main(int argc, char* argv[])
Expand Down Expand Up @@ -287,9 +287,9 @@ int main(int argc, char* argv[])
pthread_join(serviceThread, NULL);

SolidSyslog_Destroy();
SolidSyslogOriginSd_Destroy();
SolidSyslogTimeQualitySd_Destroy();
SolidSyslogMetaSd_Destroy();
SolidSyslogOriginSd_Destroy(originSd);
SolidSyslogTimeQualitySd_Destroy(timeQuality);
SolidSyslogMetaSd_Destroy(metaSd);
SolidSyslogStdAtomicCounter_Destroy(counter);
DestroyStore(store, &options);
SolidSyslogPosixMessageQueueBuffer_Destroy();
Expand Down
24 changes: 12 additions & 12 deletions Bdd/Targets/Windows/BddTargetWindows.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ static volatile bool shutdownFlag;
static struct SolidSyslogStream* plainTcpStream;
static struct SolidSyslogSender* plainTcpSender;
static struct SolidSyslogDatagram* udpDatagram;
static struct SolidSyslogSender* udpSender;
static struct SolidSyslogSender* switchingSender;

/* Block-store backing — created in CreateStore, released in DestroyStore. */
static struct SolidSyslogFile* storeFile;
Expand Down Expand Up @@ -186,7 +188,7 @@ static struct SolidSyslogSender* CreateSender(const struct BddTargetWindowsOptio
udpConfig.Datagram = udpDatagram;
udpConfig.Endpoint = GetEndpoint;
udpConfig.EndpointVersion = GetEndpointVersion;
struct SolidSyslogSender* udpSender = SolidSyslogUdpSender_Create(&udpConfig);
udpSender = SolidSyslogUdpSender_Create(&udpConfig);

plainTcpStream = SolidSyslogWinsockTcpStream_Create(&tcpStreamStorage);
static struct SolidSyslogStreamSenderConfig tcpConfig = {0};
Expand All @@ -209,16 +211,17 @@ static struct SolidSyslogSender* CreateSender(const struct BddTargetWindowsOptio
switchConfig.Selector = BddTargetSwitchConfig_Selector;

BddTargetSwitchConfig_SetByName(options->Transport);
return SolidSyslogSwitchingSender_Create(&switchConfig);
switchingSender = SolidSyslogSwitchingSender_Create(&switchConfig);
return switchingSender;
}

static void DestroySender(void)
{
SolidSyslogSwitchingSender_Destroy();
SolidSyslogSwitchingSender_Destroy(switchingSender);
BddTargetTlsSender_Destroy();
SolidSyslogStreamSender_Destroy(plainTcpSender);
SolidSyslogWinsockTcpStream_Destroy(plainTcpStream);
SolidSyslogUdpSender_Destroy();
SolidSyslogUdpSender_Destroy(udpSender);
SolidSyslogWinsockDatagram_Destroy();
SolidSyslogWinsockResolver_Destroy();
}
Expand Down Expand Up @@ -252,7 +255,7 @@ static struct SolidSyslogStore* CreateStore(const struct BddTargetWindowsOptions
return SolidSyslogBlockStore_Create(&storeStorage, &storeConfig);
}

return SolidSyslogNullStore_Create();
return SolidSyslogNullStore_Get();
}

static void DestroyStore(struct SolidSyslogStore* store, const struct BddTargetWindowsOptions* options)
Expand All @@ -266,10 +269,7 @@ static void DestroyStore(struct SolidSyslogStore* store, const struct BddTargetW
SolidSyslogCrc16Policy_Destroy();
SolidSyslogWindowsFile_Destroy(storeFile);
}
else
{
SolidSyslogNullStore_Destroy();
}
/* else: NullStore is shared and immutable — nothing to destroy. */
}

int BddTargetWindows_Run(int argc, char* argv[])
Expand Down Expand Up @@ -358,9 +358,9 @@ int BddTargetWindows_Run(int argc, char* argv[])
CloseHandle(serviceThread);

SolidSyslog_Destroy();
SolidSyslogOriginSd_Destroy();
SolidSyslogTimeQualitySd_Destroy();
SolidSyslogMetaSd_Destroy();
SolidSyslogOriginSd_Destroy(originSd);
SolidSyslogTimeQualitySd_Destroy(timeQuality);
SolidSyslogMetaSd_Destroy(metaSd);
SolidSyslogWindowsAtomicCounter_Destroy(counter);
DestroyStore(store, &options);
SolidSyslogCircularBuffer_Destroy(buffer);
Expand Down
Loading
Loading