All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/conga_ssl SSLClient.cpp
Date: 22 Jan 2008 15:07:47 -0000	[thread overview]
Message-ID: <20080122150747.22343.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	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	other threads:[~2008-01-22 15:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080122150747.22343.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.