pidgin: 2bf3cee9: Remove the deprecated purple_network_lis...
andrew.victor at mxit.com
andrew.victor at mxit.com
Sat Sep 24 17:20:56 EDT 2011
----------------------------------------------------------------------
Revision: 2bf3cee9396038b63489efcff68b495f69a0960e
Parent: 461ff5d0b22ae38e586cce796e74bb9cf56abcfe
Author: andrew.victor at mxit.com
Date: 09/24/11 16:36:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2bf3cee9396038b63489efcff68b495f69a0960e
Changelog:
Remove the deprecated purple_network_listen(), and rename the newer
purple_network_listen_family() to renamed to purple_network_listen().
Changes against parent 461ff5d0b22ae38e586cce796e74bb9cf56abcfe
patched ChangeLog.API
patched libpurple/network.c
patched libpurple/network.h
patched libpurple/plugins/perl/common/Network.xs
patched libpurple/protocols/bonjour/jabber.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/protocols/yahoo/yahoo_filexfer.c
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c 22edb2b89e792e1fa33a0c8daeaebbfb950dcbe9
+++ libpurple/protocols/yahoo/libymsg.c 05520ec5e9c9f80894f9aacbc4492861d0956a1b
@@ -2770,7 +2770,7 @@ void yahoo_send_p2p_pkt(PurpleConnection
if (yd->listen_data)
purple_debug_warning("yahoo","p2p: Failed to create p2p server - server already exists\n");
else {
- yd->listen_data = purple_network_listen(YAHOO_PAGER_PORT_P2P, SOCK_STREAM, yahoo_p2p_server_listen_cb, p2p_data);
+ yd->listen_data = purple_network_listen(YAHOO_PAGER_PORT_P2P, AF_UNSPEC, SOCK_STREAM, yahoo_p2p_server_listen_cb, p2p_data);
if (yd->listen_data == NULL)
purple_debug_warning("yahoo","p2p: Failed to created p2p server\n");
}
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c b8f7dd587a4818d1fbd25ab8f14b63c1dd956e11
+++ libpurple/protocols/yahoo/yahoo_filexfer.c 8da55363edb4362794e8b1da099ae5be15a2fb26
@@ -1216,7 +1216,7 @@ static void yahoo_xfer_send_cb_15(gpoint
close(source);
xfer->fd = -1;
/* start local server, listen for connections */
- purple_network_listen(xd->yahoo_local_p2p_ft_server_port, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer);
+ purple_network_listen(xd->yahoo_local_p2p_ft_server_port, AF_UNSPEC, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer);
}
else
{
============================================================
--- libpurple/network.c ec458773822b34cfb27d98c65dd1ee4c4e4f272b
+++ libpurple/network.c dc715e1df99d7054e37c033a99d2da66b4616c14
@@ -531,7 +531,7 @@ PurpleNetworkListenData *
}
PurpleNetworkListenData *
-purple_network_listen_family(unsigned short port, int socket_family,
+purple_network_listen(unsigned short port, int socket_family,
int socket_type, PurpleNetworkListenCallback cb,
gpointer cb_data)
{
@@ -542,14 +542,6 @@ PurpleNetworkListenData *
}
PurpleNetworkListenData *
-purple_network_listen(unsigned short port, int socket_type,
- PurpleNetworkListenCallback cb, gpointer cb_data)
-{
- return purple_network_listen_family(port, AF_UNSPEC, socket_type,
- cb, cb_data);
-}
-
-PurpleNetworkListenData *
purple_network_listen_range_family(unsigned short start, unsigned short end,
int socket_family, int socket_type,
PurpleNetworkListenCallback cb,
============================================================
--- libpurple/network.h 632920aae6e16738708a7e3bae2b9077a5410e79
+++ libpurple/network.h 78544b8cdbf863007b5d089b676767a8a53ec731
@@ -142,7 +142,18 @@ void purple_network_listen_map_external(
* close the listening socket, and add a new watcher on the new socket accept
* returned.
*
+ * Libpurple does not currently do any port mapping (stateful firewall hole
+ * poking) for IPv6-only listeners (if an IPv6 socket supports v4-mapped
+ * addresses, a mapping is done).
+ *
* @param port The port number to bind to. Must be greater than 0.
+ * @param socket_family The protocol family of the socket. This should be
+ * AF_INET for IPv4 or AF_INET6 for IPv6. IPv6 sockets
+ * may or may not be able to accept IPv4 connections
+ * based on the system configuration (use
+ * purple_socket_speaks_ipv4 to check). If an IPv6
+ * socket doesn't accept V4-mapped addresses, you will
+ * need a second listener to support both v4 and v6.
* @param socket_type The type of socket to open for listening.
* This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
* @param cb The callback to be invoked when the port to listen on is available.
@@ -155,26 +166,6 @@ PurpleNetworkListenData *purple_network_
* socket to listen on.
*/
PurpleNetworkListenData *purple_network_listen(unsigned short port,
- int socket_type, PurpleNetworkListenCallback cb, gpointer cb_data);
-
-/**
- * \copydoc purple_network_listen
- *
- * Libpurple does not currently do any port mapping (stateful firewall hole
- * poking) for IPv6-only listeners (if an IPv6 socket supports v4-mapped
- * addresses, a mapping is done).
- *
- * @param socket_family The protocol family of the socket. This should be
- * AF_INET for IPv4 or AF_INET6 for IPv6. IPv6 sockets
- * may or may not be able to accept IPv4 connections
- * based on the system configuration (use
- * purple_socket_speaks_ipv4 to check). If an IPv6
- * socket doesn't accept V4-mapped addresses, you will
- * need a second listener to support both v4 and v6.
- * @since 2.7.0
- * @deprecated This function will be renamed to purple_network_listen in 3.0.0.
- */
-PurpleNetworkListenData *purple_network_listen_family(unsigned short port,
int socket_family, int socket_type, PurpleNetworkListenCallback cb,
gpointer cb_data);
============================================================
--- ChangeLog.API da30dfd63ab68fab212f4a0ae03b27e24117ac4c
+++ ChangeLog.API ea7251cd5c52f13ac493257ce37f927ca0668240
@@ -57,6 +57,7 @@ version 3.0.0 (??/??/????):
to purple_certificate_check_signature_chain
* purple_connection_error now takes a PurpleConnectionError
as the second parameter
+ * purple_network_listen_family renamed to purple_network_listen
* purple_notify_user_info_add_pair renamed to
purple_notify_user_info_add_pair_html
* purple_notify_user_info_get_entries returns a GQueue instead of
============================================================
--- libpurple/plugins/perl/common/Network.xs 33be31409873a5822c7a3363b87b9ad1d621170c
+++ libpurple/plugins/perl/common/Network.xs 2b57a8fae18127af4bcadc412d8d2d868fdb70a1
@@ -23,8 +23,9 @@ Purple::NetworkListenData
const char *ip
Purple::NetworkListenData
-purple_network_listen(port, socket_type, cb, cb_data)
+purple_network_listen(port, socket_family, socket_type, cb, cb_data)
unsigned short port
+ int socket_family
int socket_type
Purple::NetworkListenCallback cb
gpointer cb_data
============================================================
--- libpurple/protocols/bonjour/jabber.c 4ad335c20b278e3753d7242721c9f94705286ecc
+++ libpurple/protocols/bonjour/jabber.c 4345fdaf582ab7952737bc7eba2a6c5934eba019
@@ -744,7 +744,7 @@ start_serversocket_listening(int port, i
#if 0
/* TODO: Why isn't this being used? */
- data->socket = purple_network_listen(jdata->port, SOCK_STREAM);
+ data->socket = purple_network_listen(jdata->port, AF_UNSPEC, SOCK_STREAM);
if (jdata->socket == -1)
{
More information about the Commits
mailing list