[Commits] [SCM] claws branch, master, updated. 3.9.3-77-ge664b67

colin at claws-mail.org colin at claws-mail.org
Mon Apr 21 13:50:52 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  e664b676602274aa7e7056444de88fa8f5684185 (commit)
      from  f38cf9f13e82e0c1012286573ad96511f2d868c1 (commit)


- Log -----------------------------------------------------------------
commit e664b676602274aa7e7056444de88fa8f5684185
Author: Colin Leroy <colin at colino.net>
Date:   Mon Apr 21 13:49:46 2014 +0200

    Fix bug #3139, "Mainwindow unresponsive due to a busy loop"
    In case of unexpected return from gnutls_record_recv(), set errno to
    a fatal error.

diff --git a/src/common/session.c b/src/common/session.c
index c43e5e4..25038c9 100644
--- a/src/common/session.c
+++ b/src/common/session.c
@@ -528,9 +528,10 @@ static gboolean session_read_msg_cb(SockInfo *source, GIOCondition condition,
 	session_set_timeout(session, session->timeout_interval);
 
 	if (session->read_buf_len == 0) {
-		gint read_len;
+		gint read_len = -1;
 
-		read_len = sock_read(session->sock, session->read_buf,
+		if (session->sock)
+			read_len = sock_read(session->sock, session->read_buf,
 				     SESSION_BUFFSIZE - 1);
 
 		if (read_len == -1 && session->state == SESSION_DISCONNECTED) {
diff --git a/src/common/socket.c b/src/common/socket.c
index 0245910..1d6638d 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1417,6 +1417,8 @@ static gint ssl_read(gnutls_session_t ssl, gchar *buf, gint len)
 			return -1;
 
 		default:
+			debug_print("Unexpected SSL read result %d\n", r);
+			errno = EIO;
 			return -1;
 		}
 	}

-----------------------------------------------------------------------

Summary of changes:
 src/common/session.c |    5 +++--
 src/common/socket.c  |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list