pidgin: 594499c2: a patch from eperez that corrects EOF de...

khc at pidgin.im khc at pidgin.im
Thu Dec 18 02:31:19 EST 2008


-----------------------------------------------------------------
Revision: 594499c2962474322f63d0dea4c16760a2f764f6
Ancestor: 4b199542a64ade94d38f23bd0907fdb7d35c2269
Author: khc at pidgin.im
Date: 2008-12-18T07:25:37
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/594499c2962474322f63d0dea4c16760a2f764f6

Modified files:
        libpurple/protocols/msn/soap.c
        libpurple/protocols/msnp9/nexus.c

ChangeLog: 

a patch from eperez that corrects EOF detection, Fixes #7726

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/soap.c	a0d0310469dff2036b06d60b54b06db0b11ea595
+++ libpurple/protocols/msn/soap.c	471109ac485058a9b0dce16f874080883b214c89
@@ -521,7 +521,7 @@ msn_soap_read_cb(gpointer data, gint fd,
 	/* msn_soap_process could alter errno */
 	msn_soap_process(conn);
 
-	if (cnt < 0 && perrno != EAGAIN) {
+	if (cnt < 0 && perrno != EAGAIN || cnt == 0) {
 		/* It's possible msn_soap_process closed the ssl connection */
 		if (conn->ssl) {
 			purple_ssl_close(conn->ssl);
============================================================
--- libpurple/protocols/msnp9/nexus.c	701bdb74e359349b2caf31802986ca24ec7ab8c7
+++ libpurple/protocols/msnp9/nexus.c	fdd2d14536f09f546d22f1283be42ece0a3d285d
@@ -168,7 +168,7 @@ nexus_login_written_cb(gpointer data, gi
 
 	if (len < 0 && errno == EAGAIN)
 		return;
-	else if (len < 0) {
+	else if (len <= 0) {
 		purple_input_remove(nexus->input_handler);
 		nexus->input_handler = 0;
 		g_free(nexus->read_buf);
@@ -415,7 +415,7 @@ nexus_connect_written_cb(gpointer data, 
 
 	if (len < 0 && errno == EAGAIN)
 		return;
-	else if (len < 0) {
+	else if (len <= 0) {
 		purple_input_remove(nexus->input_handler);
 		nexus->input_handler = 0;
 		g_free(nexus->read_buf);


More information about the Commits mailing list