/pidgin/main: 30cc3ef7c5d3: Fix handling EAGAIN in purple_ssl_re...

Mike Ruprecht <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 30cc3ef7c5d375aef5afadebad24c4179024759a
Author:	 Mike Ruprecht <[email protected]>
Date:	 2016-03-31 20:18 -0500
Branch:	 purple-ssl-to-gio
URL: https://hg.pidgin.im/pidgin/main/rev/30cc3ef7c5d3

Description:

Fix handling EAGAIN in purple_ssl_read()

This patch fixes EAGAIN being incorrectly detected when receiving
data on an SSL connection using purple_ssl_read().

diffstat:

 libpurple/sslconn.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff --git a/libpurple/sslconn.c b/libpurple/sslconn.c
--- a/libpurple/sslconn.c
+++ b/libpurple/sslconn.c
@@ -322,7 +322,8 @@ purple_ssl_read(PurpleSslConnection *gsc
 			gsc->cancellable, &error);
 
 	if (outlen < 0) {
-		if (outlen == G_IO_ERROR_WOULD_BLOCK) {
+		if (g_error_matches(error, G_IO_ERROR,
+				G_IO_ERROR_WOULD_BLOCK)) {
 			errno = EAGAIN;
 		}
 

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.