]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
conftest: Fix build with DEBUG_LEVEL < 1
authorTobias Brunner <tobias@strongswan.org>
Wed, 3 May 2023 10:31:45 +0000 (12:31 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 May 2023 15:32:18 +0000 (17:32 +0200)
src/conftest/hooks/force_cookie.c
src/conftest/hooks/log_id.c
src/conftest/hooks/log_ke.c
src/conftest/hooks/log_ts.c

index 10b6ec6b016f69f3bf7ea694654f5fce0447ef9a..a2bc0dda16a0727904103e891e246ba6a4c995e9 100644 (file)
@@ -48,12 +48,13 @@ METHOD(listener_t, message, bool,
                        if (payload->get_type(payload) == PLV2_NOTIFY)
                        {
                                notify_payload_t *notify = (notify_payload_t*)payload;
-                               chunk_t data;
 
                                if (notify->get_notify_type(notify) == COOKIE)
                                {
-                                       data = notify->get_notification_data(notify);
+#if DEBUG_LEVEL >= 1
+                                       chunk_t data = notify->get_notification_data(notify);
                                        DBG1(DBG_CFG, "received COOKIE: %#B", &data);
+#endif
                                        has_cookie = TRUE;
                                        break;
                                }
index 07caedfc57fadd2e5b9b4f92e4c3e7be5a501155..15bfae2d4dbddd66a313131b579752db81007298 100644 (file)
@@ -35,6 +35,7 @@ METHOD(listener_t, message, bool,
        private_log_id_t *this, ike_sa_t *ike_sa, message_t *message,
        bool incoming, bool plain)
 {
+#if DEBUG_LEVEL >= 1
        if (incoming && plain)
        {
                enumerator_t *enumerator;
@@ -62,6 +63,9 @@ METHOD(listener_t, message, bool,
                enumerator->destroy(enumerator);
        }
        return TRUE;
+#else
+       return FALSE;
+#endif
 }
 
 METHOD(hook_t, destroy, void,
index 766686dd3d977f6458545908d1208cfad8d047d2..13153bd96fe360514a995fc232abd45febe31a65 100644 (file)
@@ -35,6 +35,7 @@ METHOD(listener_t, message, bool,
        private_log_ke_t *this, ike_sa_t *ike_sa, message_t *message,
        bool incoming, bool plain)
 {
+#if DEBUG_LEVEL >= 1
        if (incoming && plain)
        {
                enumerator_t *enumerator;
@@ -54,6 +55,9 @@ METHOD(listener_t, message, bool,
                enumerator->destroy(enumerator);
        }
        return TRUE;
+#else
+       return FALSE;
+#endif
 }
 
 METHOD(hook_t, destroy, void,
index 5533717eaf271d87d235d6c0f5d6867f8c21b1c8..f750042ff50de0a7a48a6ef1caeee6c7d6a42158 100644 (file)
@@ -35,6 +35,7 @@ METHOD(listener_t, message, bool,
        private_log_ts_t *this, ike_sa_t *ike_sa, message_t *message,
        bool incoming, bool plain)
 {
+#if DEBUG_LEVEL >= 1
        if (incoming && plain)
        {
                enumerator_t *enumerator;
@@ -77,6 +78,9 @@ METHOD(listener_t, message, bool,
                enumerator->destroy(enumerator);
        }
        return TRUE;
+#else
+       return FALSE;
+#endif
 }
 
 METHOD(hook_t, destroy, void,