cpw.malu.xmpp.jingle_ft: 22bd92ef: Remove port mappings for S5B jingle tran...

malu at pidgin.im malu at pidgin.im
Mon Jun 22 18:25:28 EDT 2009


-----------------------------------------------------------------
Revision: 22bd92ef42ba7a2bf5975c87f6df68e601fc9d0d
Ancestor: 6839df975b384e52dec320c66e00dcf7f2c3c813
Author: malu at pidgin.im
Date: 2009-06-22T22:20:47
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/22bd92ef42ba7a2bf5975c87f6df68e601fc9d0d

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

ChangeLog: 

Remove port mappings for S5B jingle transport

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	ddba74424eeeed0b9d50fe6f0ea7a25fafd1265a
+++ libpurple/protocols/jabber/jingle/s5b.c	c7b2af23652fc3f56bfd2f35cd5042a795f1c8c4
@@ -254,7 +254,13 @@ jingle_s5b_finalize (GObject *s5b)
 	
 	if (priv->sid)
 		g_free(priv->sid);
-	
+
+	/* remove port mapping */
+	if (priv->fd >= 0) {
+		purple_network_remove_port_mapping(priv->fd);
+		close(priv->fd);
+	}
+
 	/* free the local streamhosts */
 	while (priv->local_streamhosts) {
 		jingle_s5b_streamhost_destroy(
@@ -440,6 +446,7 @@ jingle_s5b_surrender(JingleS5B *s5b)
 	s5b->priv->fd = s5b->priv->remote_fd;
 	
 	if (s5b->priv->local_fd >= 0) {
+		purple_network_remove_port_mapping(s5b->priv->local_fd);
 		close(s5b->priv->local_fd);
 		s5b->priv->local_fd = -1;
 	}


More information about the Commits mailing list