eap-ttls: Fix build with DEBUG_LEVEL < 1

This commit is contained in:
Tobias Brunner
2023-05-08 17:32:18 +02:00
parent cbedbf3ef1
commit e252e1b465
2 changed files with 13 additions and 14 deletions
@@ -79,7 +79,7 @@ METHOD(tls_application_t, process, status_t,
pen_t vendor, received_vendor;
uint16_t eap_len;
size_t eap_pos = 0;
bool concatenated = FALSE;
bool concatenated DBG_UNUSED = FALSE;
do
{
@@ -239,9 +239,6 @@ METHOD(tls_application_t, build, status_t,
private_eap_ttls_peer_t *this, bio_writer_t *writer)
{
chunk_t data;
eap_code_t code;
eap_type_t type;
pen_t vendor;
if (this->method == NULL && this->start_phase2)
{
@@ -261,11 +258,13 @@ METHOD(tls_application_t, build, status_t,
if (this->out)
{
code = this->out->get_code(this->out);
type = this->out->get_type(this->out, &vendor);
#if DEBUG_LEVEL >= 1
pen_t vendor;
eap_code_t code = this->out->get_code(this->out);
eap_type_t type = this->out->get_type(this->out, &vendor);
DBG1(DBG_IKE, "sending tunneled EAP-TTLS AVP [EAP/%N/%N]",
eap_code_short_names, code, eap_type_short_names, type);
eap_code_short_names, code, eap_type_short_names, type);
#endif
/* get the raw EAP message data */
data = this->out->get_data(this->out);
this->avp->build(this->avp, writer, data);
@@ -308,9 +308,6 @@ METHOD(tls_application_t, build, status_t,
private_eap_ttls_server_t *this, bio_writer_t *writer)
{
chunk_t data;
eap_code_t code;
eap_type_t type;
pen_t vendor;
if (this->method == NULL && this->start_phase2 &&
lib->settings->get_bool(lib->settings,
@@ -333,10 +330,13 @@ METHOD(tls_application_t, build, status_t,
if (this->out)
{
code = this->out->get_code(this->out);
type = this->out->get_type(this->out, &vendor);
#if DEBUG_LEVEL >= 1
pen_t vendor;
eap_code_t code = this->out->get_code(this->out);
eap_type_t type = this->out->get_type(this->out, &vendor);
DBG1(DBG_IKE, "sending tunneled EAP-TTLS AVP [EAP/%N/%N]",
eap_code_short_names, code, eap_type_short_names, type);
eap_code_short_names, code, eap_type_short_names, type);
#endif
/* get the raw EAP message data */
data = this->out->get_data(this->out);