pidgin: faf284dc: Rename purple_network_listen_range_famil...
andrew.victor at mxit.com
andrew.victor at mxit.com
Sat Sep 24 17:20:58 EDT 2011
----------------------------------------------------------------------
Revision: faf284dcf09c007e89366920d31394d6e087d796
Parent: 2bf3cee9396038b63489efcff68b495f69a0960e
Author: andrew.victor at mxit.com
Date: 09/24/11 16:48:59
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/faf284dcf09c007e89366920d31394d6e087d796
Changelog:
Rename purple_network_listen_range_family() to purple_network_listen_range().
Changes against parent 2bf3cee9396038b63489efcff68b495f69a0960e
patched ChangeLog.API
patched libpurple/network.c
patched libpurple/network.h
patched libpurple/plugins/perl/common/Network.xs
patched libpurple/protocols/bonjour/bonjour_ft.c
patched libpurple/protocols/irc/dcc_send.c
patched libpurple/protocols/jabber/si.c
patched libpurple/protocols/msn/slpcall.c
patched libpurple/protocols/oscar/peer.c
patched libpurple/protocols/simple/simple.c
patched libpurple/protocols/yahoo/yahoo_filexfer.c
patched libpurple/stun.c
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/si.c 8ca38c55fd30eb95e7bb64fe2c45a5ae74dfae3d
+++ libpurple/protocols/jabber/si.c 757f5493d4e34009b2a32e6959641f565e547d13
@@ -959,7 +959,7 @@ jabber_si_xfer_bytestreams_send_init(Pur
purple_debug_info("jabber", "Skipping attempting local streamhost.\n");
jsx->listen_data = NULL;
} else
- jsx->listen_data = purple_network_listen_range(0, 0, SOCK_STREAM,
+ jsx->listen_data = purple_network_listen_range(0, 0, AF_UNSPEC, SOCK_STREAM,
jabber_si_xfer_bytestreams_listen_cb, xfer);
if (jsx->listen_data == NULL) {
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c 8da55363edb4362794e8b1da099ae5be15a2fb26
+++ libpurple/protocols/yahoo/yahoo_filexfer.c 9771c56d431e7a0ec5a8b78b7a3e16bdb3b68374
@@ -1570,7 +1570,7 @@ static void yahoo_p2p_client_send_ft_inf
p2p_data = g_hash_table_lookup(yd->peers, purple_xfer_get_remote_user(xfer));
if( p2p_data->connection_type == YAHOO_P2P_WE_ARE_SERVER )
- if(purple_network_listen_range(0, 0, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer))
+ if(purple_network_listen_range(0, 0, AF_UNSPEC, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer))
return;
pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_INFO_15, YAHOO_STATUS_AVAILABLE, yd->session_id);
@@ -1871,7 +1871,7 @@ void yahoo_process_filetrans_info_15(Pur
purple_xfer_cancel_remote(xfer);
return;
}
- if(!purple_network_listen_range(0, 0, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer)) {
+ if(!purple_network_listen_range(0, 0, AF_UNSPEC, SOCK_STREAM, yahoo_p2p_ft_server_listen_cb, xfer)) {
purple_xfer_cancel_remote(xfer);
return;
}
============================================================
--- libpurple/network.c dc715e1df99d7054e37c033a99d2da66b4616c14
+++ libpurple/network.c f669e498f223f6bc99686de7aed5d600585f1ad7
@@ -542,7 +542,7 @@ PurpleNetworkListenData *
}
PurpleNetworkListenData *
-purple_network_listen_range_family(unsigned short start, unsigned short end,
+purple_network_listen_range(unsigned short start, unsigned short end,
int socket_family, int socket_type,
PurpleNetworkListenCallback cb,
gpointer cb_data)
@@ -566,15 +566,6 @@ purple_network_listen_range_family(unsig
return ret;
}
-PurpleNetworkListenData *
-purple_network_listen_range(unsigned short start, unsigned short end,
- int socket_type, PurpleNetworkListenCallback cb,
- gpointer cb_data)
-{
- return purple_network_listen_range_family(start, end, AF_UNSPEC,
- socket_type, cb, cb_data);
-}
-
void purple_network_listen_cancel(PurpleNetworkListenData *listen_data)
{
if (listen_data->mapping_data != NULL)
============================================================
--- libpurple/network.h 78544b8cdbf863007b5d089b676767a8a53ec731
+++ libpurple/network.h 0ff713f4deb627f9a0c37aab2571e51bfa380437
@@ -183,11 +183,22 @@ PurpleNetworkListenData *purple_network_
* 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 start The port number to bind to, or 0 to pick a random port.
* Users are allowed to override this arg in prefs.
* @param end The highest possible port in the range of ports to listen on,
* or 0 to pick a random port. Users are allowed to override this
* arg in prefs.
+ * @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.
@@ -199,29 +210,7 @@ PurpleNetworkListenData *purple_network_
* the pending listener, or NULL if unable to obtain a local
* socket to listen on.
*/
-PurpleNetworkListenData *purple_network_listen_range(unsigned short start,
- unsigned short end, int socket_type,
- PurpleNetworkListenCallback cb, gpointer cb_data);
-
-/**
- * \copydoc purple_network_listen_range
- *
- * 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_range
- * in 3.0.0.
- */
-PurpleNetworkListenData *purple_network_listen_range_family(
+PurpleNetworkListenData *purple_network_listen_range(
unsigned short start, unsigned short end, int socket_family,
int socket_type, PurpleNetworkListenCallback cb, gpointer cb_data);
============================================================
--- libpurple/protocols/irc/dcc_send.c bc593f4f73dcb10ebd3fa54015f76ed3042432b3
+++ libpurple/protocols/irc/dcc_send.c 5257407106cab679c74d37c0da173f3fb6276f16
@@ -339,7 +339,7 @@ static void irc_dccsend_send_init(Purple
purple_xfer_ref(xfer);
/* Create a listening socket */
- xd->listen_data = purple_network_listen_range(0, 0, SOCK_STREAM,
+ xd->listen_data = purple_network_listen_range(0, 0, AF_UNSPEC, SOCK_STREAM,
irc_dccsend_network_listen_cb, xfer);
if (xd->listen_data == NULL) {
purple_xfer_unref(xfer);
============================================================
--- ChangeLog.API ea7251cd5c52f13ac493257ce37f927ca0668240
+++ ChangeLog.API 30c67b20ea12376fbf6eebe346db8316cdaa39c7
@@ -58,6 +58,8 @@ version 3.0.0 (??/??/????):
* purple_connection_error now takes a PurpleConnectionError
as the second parameter
* purple_network_listen_family renamed to purple_network_listen
+ * purple_network_listen_range_family renamed to
+ purple_network_listen_range
* 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/protocols/msn/slpcall.c 2c283879037cc63c220d019b5ae7962ea20a316d
+++ libpurple/protocols/msn/slpcall.c 635419bf04fce505cf84137cb6f25428987b16cd
@@ -731,6 +731,7 @@ got_invite(MsnSlpCall *slpcall,
dc->listen_data = purple_network_listen_range(
0, 0,
+ AF_UNSPEC,
SOCK_STREAM,
msn_dc_listen_socket_created_cb,
dc
@@ -832,6 +833,7 @@ got_ok(MsnSlpCall *slpcall,
dc->listen_data = purple_network_listen_range(
0, 0,
+ AF_UNSPEC,
SOCK_STREAM,
msn_dc_listen_socket_created_cb,
dc
============================================================
--- libpurple/plugins/perl/common/Network.xs 2b57a8fae18127af4bcadc412d8d2d868fdb70a1
+++ libpurple/plugins/perl/common/Network.xs e0211e1f1e983623d8e86aa484f49b6a32891d51
@@ -31,9 +31,10 @@ Purple::NetworkListenData
gpointer cb_data
Purple::NetworkListenData
-purple_network_listen_range(start, end, socket_type, cb, cb_data)
+purple_network_listen_range(start, end, socket_family, socket_type, cb, cb_data)
unsigned short start
unsigned short end
+ int socket_family
int socket_type
Purple::NetworkListenCallback cb
gpointer cb_data
============================================================
--- libpurple/protocols/simple/simple.c 6a3f2a43898745ccb735d7a7142864747ffd0d48
+++ libpurple/protocols/simple/simple.c 1f878b0100eb7517de58a8e1bde053b9a8adc8bf
@@ -1823,7 +1823,7 @@ static void simple_udp_host_resolved(GSL
}
/* create socket for incoming connections */
- sip->listen_data = purple_network_listen_range(5060, 5160, SOCK_DGRAM,
+ sip->listen_data = purple_network_listen_range(5060, 5160, AF_UNSPEC, SOCK_DGRAM,
simple_udp_host_resolved_listen_cb, sip);
if (sip->listen_data == NULL) {
purple_connection_error(sip->gc,
@@ -1893,7 +1893,7 @@ static void srvresolved(PurpleSrvRespons
/* TCP case */
if(!sip->udp) {
/* create socket for incoming connections */
- sip->listen_data = purple_network_listen_range(5060, 5160, SOCK_STREAM,
+ sip->listen_data = purple_network_listen_range(5060, 5160, AF_UNSPEC, SOCK_STREAM,
simple_tcp_connect_listen_cb, sip);
if (sip->listen_data == NULL) {
purple_connection_error(sip->gc,
============================================================
--- libpurple/stun.c ca2a68abc1c32262b1ba9f166b313057ce35f031
+++ libpurple/stun.c 97045cab022058fea0872d500571d0635bae34b2
@@ -338,7 +338,7 @@ static void hbn_cb(GSList *hosts, gpoint
return;
}
- if (!purple_network_listen_range(12108, 12208, SOCK_DGRAM, hbn_listen_cb, hosts)) {
+ if (!purple_network_listen_range(12108, 12208, AF_UNSPEC, SOCK_DGRAM, hbn_listen_cb, hosts)) {
while (hosts) {
hosts = g_slist_delete_link(hosts, hosts);
g_free(hosts->data);
============================================================
--- libpurple/protocols/oscar/peer.c 78b90138538062b0c42b16aa526416d67de353d5
+++ libpurple/protocols/oscar/peer.c 157932f39c5345c33cade079c22b7ddeaf2812fa
@@ -842,7 +842,7 @@ peer_connection_trynext(PeerConnection *
*/
conn->flags |= PEER_CONNECTION_FLAG_IS_INCOMING;
- conn->listen_data = purple_network_listen_range(5190, 5290, SOCK_STREAM,
+ conn->listen_data = purple_network_listen_range(5190, 5290, AF_UNSPEC, SOCK_STREAM,
peer_connection_establish_listener_cb, conn);
if (conn->listen_data != NULL)
{
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c 81ed1d31b5cc473250c46109d76d8670216e1d77
+++ libpurple/protocols/bonjour/bonjour_ft.c 36d4acd7474d548aac6e2a5016f23a19bc157904
@@ -793,7 +793,7 @@ bonjour_bytestreams_init(PurpleXfer *xfe
xf = purple_xfer_get_protocol_data(xfer);
purple_network_listen_map_external(FALSE);
- xf->listen_data = purple_network_listen_range(0, 0, SOCK_STREAM,
+ xf->listen_data = purple_network_listen_range(0, 0, AF_UNSPEC, SOCK_STREAM,
bonjour_bytestreams_listen, xfer);
purple_network_listen_map_external(TRUE);
if (xf->listen_data == NULL)
More information about the Commits
mailing list