cpw.malu.xmpp.jingle_ft: c8a902bb: Close fds when finalizing the s5b transp...

malu at pidgin.im malu at pidgin.im
Mon Aug 3 17:21:09 EDT 2009


-----------------------------------------------------------------
Revision: c8a902bb773095dc0c56fc445e81f4dddf2abd88
Ancestor: 5908b73fed5ef8a80f1af5ff4576254caf03ccb0
Author: malu at pidgin.im
Date: 2009-08-03T21:15:07
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/c8a902bb773095dc0c56fc445e81f4dddf2abd88

Modified files:
        libpurple/protocols/jabber/jingle/s5b.c

ChangeLog: 

Close fds when finalizing the s5b transport even if none have been assigned as
"successful"
Likewise remote port mapping for local fd even if it wasn't assigned.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	1041b5078376e272f9c0f54c1a6e9aae2b063937
+++ libpurple/protocols/jabber/jingle/s5b.c	027104fd94917025deb35314347e27ef07d9c766
@@ -337,6 +337,11 @@ jingle_s5b_finalize (GObject *s5b)
 	if (priv->fd >= 0) {
 		purple_network_remove_port_mapping(priv->fd);
 		close(priv->fd);
+	} else if (priv->local_fd >= 0) {
+		purple_network_remove_port_mapping(priv->local_fd);
+		close(priv->local_fd);
+	} else if (priv->remote_fd >= 0) {
+		close(priv->remote_fd);
 	}
 
 	/* free the local streamhosts */


More information about the Commits mailing list