Workaround for Yahoo's https server closing the connection without sending close_notify first. Thanks to reanimus for the patch. Fixes #16678. r=kbotc adium-1.5.11
authormathuaerknedam <adium@ei8ht.us>
Fri, 07 Nov 2014 09:24:06 -0600
branchadium-1.5.11
changeset 5894 60d7d05396d7
parent 5892 11518a4e520d
child 5895 c4b291694b4a
Workaround for Yahoo's https server closing the connection without sending close_notify first. Thanks to reanimus for the patch. Fixes #16678. r=kbotc
Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c
--- a/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c	Sat Jul 26 10:07:55 2014 -0400
+++ b/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c	Fri Nov 07 09:24:06 2014 -0600
@@ -644,6 +644,14 @@
 			case errSSLClosedGraceful:
 				result = 0;
 				break;
+			case errSSLClosedNoNotify:
+				result = ((processed > 0) ? processed : 0);
+				purple_debug_info("cdsa", "receive got a premature termination" );
+				break;
+			case errSSLClosedAbort:
+				result = ((processed > 0) ? processed : 0);
+				purple_debug_info("cdsa", "receive got a premature termination" );
+				break;
 			default:
 				result = -1;
 				purple_debug_error("cdsa", "receive failed (%d): %s\n", (int)err, strerror(errno));
@@ -682,6 +690,14 @@
 			case errSSLClosedGraceful:
 				result = 0;
 				break;
+			case errSSLClosedNoNotify:
+				result = ((processed > 0) ? processed : 0);
+				purple_debug_info("cdsa", "send got a premature termination" );
+				break;
+			case errSSLClosedAbort:
+				result = ((processed > 0) ? processed : 0);
+				purple_debug_info("cdsa", "send got a premature termination" );
+				break;
 			default:
 				result = -1;
 				purple_debug_error("cdsa", "send failed (%d): %s\n", (int)err, strerror(errno));