diff libpurple/network.h @ 27190:38c4973b5222

Add a function to remove a port mapping (UPnP or NAT-PMP) given a file descriptor. Adapt the XMPP PRPL to use this to remove port mappings when a file transfer is done. There is still no support for removing left-over mappings at exit, since I've found no good way of calling purple_upnp_remove_port_mapping (which relies on callbacks) from purple_network_uninit (since the main thread terminates after the _uninit functions have finished)...
author Marcus Lundblad <ml@update.uu.se>
date Mon, 15 Jun 2009 21:43:25 +0000
parents f171707b7d54
children 8ce05f8249da
line wrap: on
line diff
--- a/libpurple/network.h	Fri Jun 12 21:00:44 2009 +0000
+++ b/libpurple/network.h	Mon Jun 15 21:43:25 2009 +0000
@@ -259,7 +259,14 @@
  */
 const gchar *purple_network_get_turn_ip(void);
 		
-	
+/**
+ * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket
+ *
+ * @param fd Socket to remove the port mapping for
+ * @since 2.6.0
+ */
+void purple_network_remove_port_mapping(gint fd);	
+
 /**
  * Initializes the network subsystem.
  */