From: Tobias Brunner Date: Wed, 3 May 2023 10:31:45 +0000 (+0200) Subject: conftest: Fix build with DEBUG_LEVEL < 1 X-Git-Tag: 5.9.11rc1~12^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16c2def3ae1ba4bbe8b3b1fb6e4bd80f59796db2;p=thirdparty%2Fstrongswan.git conftest: Fix build with DEBUG_LEVEL < 1 --- diff --git a/src/conftest/hooks/force_cookie.c b/src/conftest/hooks/force_cookie.c index 10b6ec6b01..a2bc0dda16 100644 --- a/src/conftest/hooks/force_cookie.c +++ b/src/conftest/hooks/force_cookie.c @@ -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; } diff --git a/src/conftest/hooks/log_id.c b/src/conftest/hooks/log_id.c index 07caedfc57..15bfae2d4d 100644 --- a/src/conftest/hooks/log_id.c +++ b/src/conftest/hooks/log_id.c @@ -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, diff --git a/src/conftest/hooks/log_ke.c b/src/conftest/hooks/log_ke.c index 766686dd3d..13153bd96f 100644 --- a/src/conftest/hooks/log_ke.c +++ b/src/conftest/hooks/log_ke.c @@ -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, diff --git a/src/conftest/hooks/log_ts.c b/src/conftest/hooks/log_ts.c index 5533717eaf..f750042ff5 100644 --- a/src/conftest/hooks/log_ts.c +++ b/src/conftest/hooks/log_ts.c @@ -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,