CVSROOT:        /cvs/cluster
Module name:    conga
Changes by:     [EMAIL PROTECTED]       2008-01-22 15:07:46

Modified files:
        luci/conga_ssl : SSLClient.cpp 

Log message:
        sync up with my local tree
        - fixes for 252348 and 230462

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/conga_ssl/SSLClient.cpp.diff?cvsroot=cluster&r1=1.7&r2=1.8

--- conga/luci/conga_ssl/SSLClient.cpp  2008/01/02 20:52:22     1.7
+++ conga/luci/conga_ssl/SSLClient.cpp  2008/01/22 15:07:46     1.8
@@ -490,12 +490,13 @@
 SSLClient::check_error(int value, bool& want_read, bool& want_write)
 {
   want_read = want_write = false;
+  int saved_errno = errno;
 
   String e;
   switch (SSL_get_error(_ssl, value)) {
   case SSL_ERROR_NONE:
     e = "SSL_ERROR_NONE";
-    break;
+    return;
   case SSL_ERROR_ZERO_RETURN:
     e = "SSL_ERROR_ZERO_RETURN";
     break;
@@ -515,16 +516,19 @@
     e = "SSL_ERROR_WANT_X509_LOOKUP";
     break;
   case SSL_ERROR_SYSCALL:
+    if (saved_errno == EAGAIN || saved_errno == EINTR)
+        return;
     e = "SSL_ERROR_SYSCALL";
+    throw String("SSL error: ") + e + ":" + String(strerror(saved_errno));
     break;
   case SSL_ERROR_SSL:
+       char buf[2048];
     e = "SSL_ERROR_SSL";
+       ERR_error_string_n(ERR_get_error(), buf, sizeof(buf));
+       throw String("SSL error: ") + e + ":" + String(buf);
     break;
   }
 
-  //FILE* f = fopen("/tmp/ssl_error_que", "a");
-  //ERR_print_errors_fp(f);
-  //fclose(f);
-
   throw String("SSL error: ") + e;
+
 }

Reply via email to