Module: monitoring-plugins
 Branch: master
 Commit: 285000a2ad1198046275f5bd5b47227f1cd66471
 Author: Lorenz Kästle <12514511+rincewinds...@users.noreply.github.com>
   Date: Thu Mar 13 13:00:05 2025 +0100
    URL: 
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=285000a2

small fixes to check_tcp config

---

 plugins/check_tcp.d/config.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/check_tcp.d/config.h b/plugins/check_tcp.d/config.h
index 41db7224..dc25d79e 100644
--- a/plugins/check_tcp.d/config.h
+++ b/plugins/check_tcp.d/config.h
@@ -2,6 +2,7 @@
 
 #include "../../lib/utils_tcp.h"
 #include "output.h"
+#include "states.h"
 #include <netinet/in.h>
 
 typedef struct {
@@ -15,8 +16,8 @@ typedef struct {
        char *quit;
        char **server_expect;
        size_t server_expect_count;
-#ifdef HAVE_SSL
        bool use_tls;
+#ifdef HAVE_SSL
        char *sni;
        bool sni_specified;
        bool check_cert;
@@ -24,7 +25,7 @@ typedef struct {
        int days_till_exp_crit;
 #endif // HAVE_SSL
        int match_flags;
-       int expect_mismatch_state;
+       mp_state_enum expect_mismatch_state;
        unsigned int delay;
 
        bool warning_time_set;
@@ -32,7 +33,7 @@ typedef struct {
        bool critical_time_set;
        double critical_time;
 
-       int econn_refuse_state;
+       mp_state_enum econn_refuse_state;
 
        ssize_t maxbytes;
 
@@ -54,8 +55,8 @@ check_tcp_config check_tcp_config_init() {
                .quit = NULL,
                .server_expect = NULL,
                .server_expect_count = 0,
-#ifdef HAVE_SSL
                .use_tls = false,
+#ifdef HAVE_SSL
                .sni = NULL,
                .sni_specified = false,
                .check_cert = false,

Reply via email to