changeset 17514:278e22624ce5

A while ago, "Paranoid" emailed devel@p.i, having noticed that purple_ssl_close() closes the ssl fd twice. I meant to commit this fix sooner, but here it is.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 06 Jun 2007 02:09:38 +0000
parents 33063a3940a8
children fa1102b7a959
files libpurple/plugins/ssl/ssl-nss.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-nss.c	Wed Jun 06 00:58:02 2007 +0000
+++ b/libpurple/plugins/ssl/ssl-nss.c	Wed Jun 06 02:09:38 2007 +0000
@@ -311,8 +311,13 @@
 	if(!nss_data)
 		return;
 
-	if (nss_data->in) PR_Close(nss_data->in);
-	/* if (nss_data->fd) PR_Close(nss_data->fd); */
+	if (nss_data->in) {
+		PR_Close(nss_data->in);
+		gsc->fd = -1;
+	} else if (nss_data->fd) {
+		PR_Close(nss_data->fd);
+		gsc->fd = -1;
+	}
 
 	if (nss_data->handshake_handler)
 		purple_input_remove(nss_data->handshake_handler);