]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use standard return code message format
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 4 Jun 2015 22:29:29 +0000 (16:29 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 4 Jun 2015 22:29:29 +0000 (16:29 -0600)
src/modules/rlm_eap/libeap/eap_tls.c
src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c
src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c

index a06c5b131376a193137e74f6008684cf7bfddc66..82cb6eebe2343af9b94e88c4bdddf2f1585ecfb9 100644 (file)
@@ -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, "<INVALID>"));
+               REDEBUG("[eaptls verify] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        } else {
-               RDEBUG2("eaptls_verify returned \"%s\"", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
+               RDEBUG2("[eaptls verify] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
 
        switch (status) {
index e56b54402ea536b37245f66869b49ea7c6ae3125..f2089fd10ec2d697e4657ba7f23b81e1613d06c3 100644 (file)
@@ -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, "<INVALID>"));
+       } else {
+               RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
+       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, "<INVALID>"));
+               REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        } else {
-               RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
+               RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
 
        switch (status) {
index 3a76be845b5abde4975896c3091b6e637c8f0d71..76ca81a52bf96e39e86629054c3f0e589576f325 100644 (file)
@@ -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, "<INVALID>"));
+       } else {
+               RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
+       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, "<INVALID>"));
+               REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        } else {
-               RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
+               RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
 
        switch (status) {
index 2915a8916177deb3aaa68e27b90cb896bd200005..723b990159ec759599dae853b5c39b38af0981ce 100644 (file)
@@ -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, "<INVALID>"));
+       } else {
+               RDEBUG2("[eaptls start] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
+       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, "<INVALID>"));
+               REDEBUG("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        } else {
-               RDEBUG2("eaptls_process returned \"%s\"", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
+               RDEBUG2("[eaptls process] = %s", fr_int2str(fr_tls_status_table, status, "<INVALID>"));
        }
 
        switch (status) {