Don't print errors if the error is zero.
authoraland <aland>
Sun, 8 Apr 2007 06:10:40 +0000 (06:10 +0000)
committeraland <aland>
Sun, 8 Apr 2007 06:10:40 +0000 (06:10 +0000)
This closes bug #436

src/modules/rlm_eap/libeap/tls.c

index cb7f578..e47c101 100644 (file)
@@ -95,8 +95,11 @@ tls_session_t *eaptls_new_session(SSL_CTX *ssl_ctx, int client_cert)
 static int int_ssl_check(SSL *s, int ret, const char *text)
 {
        int e;
+       unsigned long l;
 
-       radlog(L_ERR, "rlm_eap: SSL error %s", ERR_error_string(ERR_get_error(), NULL));
+       if ((l = ERR_get_error()) != 0) {
+               radlog(L_ERR, "rlm_eap: SSL error %s",
+                      ERR_error_string(l, NULL));
        e = SSL_get_error(s, ret);
 
        switch(e) {