Mercurial > pidgin
changeset 32214:75d20c9836c1
Remove the deprecated purple_network_listen(), and rename the newer
purple_network_listen_family() to renamed to purple_network_listen().
author | andrew.victor@mxit.com |
---|---|
date | Sat, 24 Sep 2011 20:36:47 +0000 |
parents | 2571b01e849c |
children | 32b2a17d2f92 |
files | ChangeLog.API libpurple/network.c libpurple/network.h libpurple/plugins/perl/common/Network.xs libpurple/protocols/bonjour/jabber.c libpurple/protocols/yahoo/libymsg.c libpurple/protocols/yahoo/yahoo_filexfer.c |
diffstat | 7 files changed, 18 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Sat Sep 24 17:04:09 2011 +0000 +++ b/ChangeLog.API Sat Sep 24 20:36:47 2011 +0000 @@ -57,6 +57,7 @@ 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
--- a/libpurple/network.c Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/network.c Sat Sep 24 20:36:47 2011 +0000 @@ -531,7 +531,7 @@ } 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 * -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,
--- a/libpurple/network.h Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/network.h Sat Sep 24 20:36:47 2011 +0000 @@ -142,7 +142,18 @@ * 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 @@ * 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);
--- a/libpurple/plugins/perl/common/Network.xs Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/plugins/perl/common/Network.xs Sat Sep 24 20:36:47 2011 +0000 @@ -23,8 +23,9 @@ 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
--- a/libpurple/protocols/bonjour/jabber.c Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Sat Sep 24 20:36:47 2011 +0000 @@ -744,7 +744,7 @@ #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) {
--- a/libpurple/protocols/yahoo/libymsg.c Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Sep 24 20:36:47 2011 +0000 @@ -2770,7 +2770,7 @@ 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"); }
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c Sat Sep 24 17:04:09 2011 +0000 +++ b/libpurple/protocols/yahoo/yahoo_filexfer.c Sat Sep 24 20:36:47 2011 +0000 @@ -1216,7 +1216,7 @@ 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 {