Clear out the fd when we pass it off to the SSL subsystem

Tue, 21 Jul 2009 06:47:55 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Tue, 21 Jul 2009 06:47:55 +0000
changeset 27918
b32f476d9e35
parent 27917
e52e7ddb0cb2
child 27920
c4a459efb7b4

Clear out the fd when we pass it off to the SSL subsystem

Prevents an invalid fd error when STARTTLS fails.

libpurple/protocols/jabber/jabber.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/jabber/jabber.c	Tue Jul 21 05:33:43 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Jul 21 06:47:55 2009 +0000
@@ -699,6 +699,8 @@
 	js->gc->inpa = 0;
 	js->gsc = purple_ssl_connect_with_host_fd(js->gc->account, js->fd,
 			jabber_login_callback_ssl, jabber_ssl_connect_failure, js->certificate_CN, js->gc);
+	/* The fd is no longer our concern */
+	js->fd = -1;
 }
 
 static gboolean jabber_login_connect(JabberStream *js, const char *domain, const char *host, int port,

mercurial