From: Arran Cudbard-Bell Date: Thu, 4 Jun 2015 22:29:29 +0000 (-0600) Subject: Use standard return code message format X-Git-Tag: release_3_0_9~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cd50c957f9855a2211c0017c0a2c8a1449747a6;p=thirdparty%2Ffreeradius-server.git Use standard return code message format --- diff --git a/src/modules/rlm_eap/libeap/eap_tls.c b/src/modules/rlm_eap/libeap/eap_tls.c index a06c5b13137..82cb6eebe23 100644 --- a/src/modules/rlm_eap/libeap/eap_tls.c +++ b/src/modules/rlm_eap/libeap/eap_tls.c @@ -726,9 +726,9 @@ fr_tls_status_t eaptls_process(eap_handler_t *handler) */ status = eaptls_verify(handler); if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { - REDEBUG("eaptls_verify returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + REDEBUG("[eaptls verify] = %s", fr_int2str(fr_tls_status_table, status, "")); } else { - RDEBUG2("eaptls_verify returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + RDEBUG2("[eaptls verify] = %s", fr_int2str(fr_tls_status_table, status, "")); } switch (status) { diff --git a/src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c b/src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c index e56b54402ea..f2089fd10ec 100644 --- a/src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c +++ b/src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c @@ -203,10 +203,12 @@ static int mod_session_init(void *type_arg, eap_handler_t *handler) * related handshaking or application data. */ status = eaptls_start(handler->eap_ds, ssn->peap_flag); - RDEBUG2("Start returned %d", status); - if (status == 0) { - return 0; + if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { + REDEBUG("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); + } else { + RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); } + if (status == 0) return 0; /* * The next stage to process the packet. @@ -238,9 +240,9 @@ static int mod_process(void *arg, eap_handler_t *handler) status = eaptls_process(handler); if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { - REDEBUG("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } else { - RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } switch (status) { diff --git a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c index 3a76be845b5..76ca81a52bf 100644 --- a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c +++ b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c @@ -111,10 +111,12 @@ static int mod_session_init(void *type_arg, eap_handler_t *handler) * related handshaking or application data. */ status = eaptls_start(handler->eap_ds, ssn->peap_flag); - RDEBUG2("Start returned %d", status); - if (status == 0) { - return 0; + if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { + REDEBUG("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); + } else { + RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); } + if (status == 0) return 0; /* * The next stage to process the packet. @@ -140,9 +142,9 @@ static int CC_HINT(nonnull) mod_process(void *type_arg, eap_handler_t *handler) status = eaptls_process(handler); if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { - REDEBUG("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } else { - RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } switch (status) { diff --git a/src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c b/src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c index 2915a891617..723b990159e 100644 --- a/src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c +++ b/src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c @@ -194,10 +194,12 @@ static int mod_session_init(void *type_arg, eap_handler_t *handler) * related handshaking or application data. */ status = eaptls_start(handler->eap_ds, ssn->peap_flag); - RDEBUG2("Start returned %d", status); - if (status == 0) { - return 0; + if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { + REDEBUG("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); + } else { + RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "")); } + if (status == 0) return 0; /* * The next stage to process the packet. @@ -229,9 +231,9 @@ static int mod_process(void *arg, eap_handler_t *handler) */ status = eaptls_process(handler); if ((status == FR_TLS_INVALID) || (status == FR_TLS_FAIL)) { - REDEBUG("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } else { - RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "")); + RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "")); } switch (status) {