SolidSyslog coverage report
Current view: top level - Core/Source - SolidSyslogNullSender.c (source / functions) Coverage Total Hit
Test: SolidSyslog Lines: 100.0 % 6 6
Test Date: 2026-11-12 23:14:35 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
       2              :  * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
       3              :  */
       4              : 
       5              : #include "SolidSyslogNullSender.h"
       6              : 
       7              : #include <stdbool.h>
       8              : #include <stddef.h>
       9              : 
      10              : #include "SolidSyslogSenderDefinition.h"
      11              : 
      12              : static bool NullSender_Send(struct SolidSyslogSender* base, const void* buffer, size_t size);
      13              : static void NullSender_Disconnect(struct SolidSyslogSender* base);
      14              : 
      15         6282 : struct SolidSyslogSender* SolidSyslogNullSender_Get(void)
      16              : {
      17              :     static struct SolidSyslogSender instance = {.Send = NullSender_Send, .Disconnect = NullSender_Disconnect};
      18         6282 :     return &instance;
      19              : }
      20              : 
      21              : /* Send returns true ("delivered") so the Service algorithm drops the
      22              :  * message rather than retaining it in the Store. A misconfigured Sender
      23              :  * paired with a real Store would otherwise accumulate undeliverables
      24              :  * forever; returning true at the null-object boundary contains that. */
      25          759 : static bool NullSender_Send(struct SolidSyslogSender* base, const void* buffer, size_t size)
      26              : {
      27              :     (void) base;
      28              :     (void) buffer;
      29              :     (void) size;
      30          759 :     return true;
      31              : }
      32              : 
      33          151 : static void NullSender_Disconnect(struct SolidSyslogSender* base)
      34              : {
      35              :     (void) base;
      36          151 : }
        

Generated by: LCOV version 2.0-1