diff --git a/src/conftest/hooks/force_cookie.c b/src/conftest/hooks/force_cookie.c index 10b6ec6b0..a2bc0dda1 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 07caedfc5..15bfae2d4 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 766686dd3..13153bd96 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 5533717ea..f750042ff 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,