pidgin: ed6d087b: Replace purple_dnsquery_a_account with p...

qulogic at pidgin.im qulogic at pidgin.im
Fri Sep 2 00:39:36 EDT 2011


----------------------------------------------------------------------
Revision: ed6d087b128ba0832906253568880dd9f94dfd06
Parent:   f21ba844464858c0ea853c940fd4433ce008cb07
Author:   qulogic at pidgin.im
Date:     09/01/11 21:57:25
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ed6d087b128ba0832906253568880dd9f94dfd06

Changelog: 

Replace purple_dnsquery_a_account with purple_dnsquery_a.

Changes against parent f21ba844464858c0ea853c940fd4433ce008cb07

  patched  ChangeLog.API
  patched  libpurple/dnsquery.c
  patched  libpurple/dnsquery.h
  patched  libpurple/network.c
  patched  libpurple/protocols/jabber/disco.c
  patched  libpurple/protocols/jabber/google/jingleinfo.c
  patched  libpurple/protocols/simple/simple.c
  patched  libpurple/protocols/yahoo/yahoo_filexfer.c
  patched  libpurple/proxy.c
  patched  libpurple/stun.c

-------------- next part --------------
============================================================
--- libpurple/proxy.c	7ca2ad373cd9aa3180f4011790775334b2971251
+++ libpurple/proxy.c	f95df02b593e58a8f11510fb767dfc2c9ca6c6a5
@@ -1369,7 +1369,7 @@ s4_canwrite(gpointer data, gint source, 
 
 		proxy_do_write(connect_data, connect_data->fd, PURPLE_INPUT_WRITE);
 	} else {
-		connect_data->query_data = purple_dnsquery_a_account(
+		connect_data->query_data = purple_dnsquery_a(
 				connect_data->account, connect_data->host,
 				connect_data->port, s4_host_resolved, connect_data);
 
@@ -2088,7 +2088,7 @@ proxy_connect_socks5(PurpleProxyConnectD
 
 /**
  * This function attempts to connect to the next IP address in the list
- * of IP addresses returned to us by purple_dnsquery_a() and attemps
+ * of IP addresses returned to us by purple_dnsquery_a() and attempts
  * to connect to each one.  This is called after the hostname is
  * resolved, and each time a connection attempt fails (assuming there
  * is another IP address to try).
@@ -2317,7 +2317,7 @@ purple_proxy_connect(void *handle, Purpl
 			return NULL;
 	}
 
-	connect_data->query_data = purple_dnsquery_a_account(account, connecthost,
+	connect_data->query_data = purple_dnsquery_a(account, connecthost,
 			connectport, connection_host_resolved, connect_data);
 	if (connect_data->query_data == NULL)
 	{
@@ -2385,7 +2385,7 @@ purple_proxy_connect_udp(void *handle, P
 			return NULL;
 	}
 
-	connect_data->query_data = purple_dnsquery_a_account(account, connecthost,
+	connect_data->query_data = purple_dnsquery_a(account, connecthost,
 			connectport, connection_host_resolved, connect_data);
 	if (connect_data->query_data == NULL)
 	{
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c	e7a192c3d00d3ace0e85a8bec3b40d3c0b7ce71e
+++ libpurple/protocols/yahoo/yahoo_filexfer.c	b8f7dd587a4818d1fbd25ab8f14b63c1dd956e11
@@ -1681,13 +1681,13 @@ void yahoo_process_filetrans_15(PurpleCo
 		account = purple_connection_get_account(gc);
 		if (yd->jp)
 		{
-			purple_dnsquery_a_account(account, YAHOOJP_XFER_RELAY_HOST,
+			purple_dnsquery_a(account, YAHOOJP_XFER_RELAY_HOST,
 							YAHOOJP_XFER_RELAY_PORT,
 							yahoo_xfer_dns_connected_15, xfer);
 		}
 		else
 		{
-			purple_dnsquery_a_account(account, YAHOO_XFER_RELAY_HOST,
+			purple_dnsquery_a(account, YAHOO_XFER_RELAY_HOST,
 							YAHOO_XFER_RELAY_PORT,
 							yahoo_xfer_dns_connected_15, xfer);
 		}
============================================================
--- libpurple/network.c	157a020a2d0f90e144a1de465be40848bb51df7c
+++ libpurple/network.c	ec458773822b34cfb27d98c65dd1ee4c4e4f272b
@@ -991,7 +991,7 @@ purple_network_set_stun_server(const gch
 	if (stun_server && stun_server[0] != '\0') {
 		if (purple_network_is_available()) {
 			purple_debug_info("network", "running DNS query for STUN server\n");
-			purple_dnsquery_a_account(NULL, stun_server, 3478, purple_network_ip_lookup_cb,
+			purple_dnsquery_a(NULL, stun_server, 3478, purple_network_ip_lookup_cb,
 				&stun_ip);
 		} else {
 			purple_debug_info("network",
@@ -1009,7 +1009,7 @@ purple_network_set_turn_server(const gch
 	if (turn_server && turn_server[0] != '\0') {
 		if (purple_network_is_available()) {
 			purple_debug_info("network", "running DNS query for TURN server\n");
-			purple_dnsquery_a_account(NULL, turn_server,
+			purple_dnsquery_a(NULL, turn_server,
 				purple_prefs_get_int("/purple/network/turn_port"),
 				purple_network_ip_lookup_cb, &turn_ip);
 		} else {
============================================================
--- libpurple/protocols/jabber/disco.c	2b5e3edcf38d4fe902d67b4c4325c49bc621fe23
+++ libpurple/protocols/jabber/disco.c	7376b06c23614d87cee5bf4d5616472751bd7221
@@ -485,7 +485,7 @@ jabber_disco_stun_srv_resolve_cb(PurpleS
 			resp[0].hostname, resp[0].port);
 		account = purple_connection_get_account(js->gc);
 		js->stun_query =
-			purple_dnsquery_a_account(account, resp[0].hostname, resp[0].port,
+			purple_dnsquery_a(account, resp[0].hostname, resp[0].port,
 				jabber_disco_stun_lookup_cb, js);
 	}
 }
============================================================
--- ChangeLog.API	50f0c75e7a0376deda803d00e913a8488602c9b7
+++ ChangeLog.API	729d38f06133b98cc5757435e05c0a5db73f6380
@@ -61,6 +61,7 @@ version 3.0.0 (??/??/????):
 		  the first parameter
 		* PurpleConnectionUiOps.report_disconnect now passes a
 		  PurpleConnectionError as the second parameter
+		* purple_dnsquery_a now takes a PurpleAccount as the first parameter
 
 		Removed:
 		* _GntFileType
@@ -98,6 +99,7 @@ version 3.0.0 (??/??/????):
 		* PidginConversation.sg
 		* purple_connection_error_reason
 		* purple_core_migrate
+		* purple_dnsquery_a_account
 		* purple_notify_searchresults_column_get_title
 		* purple_notify_searchresults_get_columns_count
 		* purple_notify_searchresults_get_rows_count
@@ -107,7 +109,7 @@ version 3.0.0 (??/??/????):
 		* purple_strlcat
 		* purple_strlcpy
 		* purple_util_fetch_url_request_len_with_account.  Use
-		  purple_util_fetch_url_request_len, insetad.
+		  purple_util_fetch_url_request_len, instead.
 		* PurpleConnectionUiOps.report_disconnect_reason
 		* struct _GtkIMHtmlFontDetail
 		* struct _PurpleMenuAction
============================================================
--- libpurple/protocols/simple/simple.c	5451935b1fd28ba8643e88d7422c713585670784
+++ libpurple/protocols/simple/simple.c	ca4a0a4a60d33f417d171c12befa4022643d3cdb
@@ -1904,7 +1904,7 @@ static void srvresolved(PurpleSrvRespons
 	} else { /* UDP */
 		purple_debug_info("simple", "using udp with server %s and port %d\n", hostname, port);
 
-		sip->query_data = purple_dnsquery_a_account(sip->account, hostname,
+		sip->query_data = purple_dnsquery_a(sip->account, hostname,
 			port, simple_udp_host_resolved, sip);
 		if (sip->query_data == NULL) {
 			purple_connection_error(sip->gc,
============================================================
--- libpurple/stun.c	f22c2ce3d2d7f5c685f889a4602c910ae6e19945
+++ libpurple/stun.c	d61f5ade42b3420270ecb68d82c075de15c51ff0
@@ -365,7 +365,7 @@ static void do_test1(PurpleSrvResponse *
 	purple_debug_info("stun", "got %d SRV responses, server: %s, port: %d\n",
 		results, servername, port);
 
-	purple_dnsquery_a_account(NULL, servername, port, hbn_cb, NULL);
+	purple_dnsquery_a(NULL, servername, port, hbn_cb, NULL);
 	g_free(resp);
 }
 
============================================================
--- libpurple/dnsquery.c	457b4ffe462fc9280c1e994dc77b5d9aaa1f80f1
+++ libpurple/dnsquery.c	9cef1e98757c655be07de54bf86443fa8acc0c19
@@ -914,7 +914,7 @@ PurpleDnsQueryData *
 }
 
 PurpleDnsQueryData *
-purple_dnsquery_a_account(PurpleAccount *account, const char *hostname, int port,
+purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port,
 				PurpleDnsQueryConnectFunction callback, gpointer data)
 {
 	PurpleDnsQueryData *query_data;
@@ -944,13 +944,6 @@ purple_dnsquery_a_account(PurpleAccount 
 	return query_data;
 }
 
-PurpleDnsQueryData *
-purple_dnsquery_a(const char *hostname, int port,
-				PurpleDnsQueryConnectFunction callback, gpointer data)
-{
-	return purple_dnsquery_a_account(NULL, hostname, port, callback, data);
-}
-
 void
 purple_dnsquery_destroy(PurpleDnsQueryData *query_data)
 {
============================================================
--- libpurple/dnsquery.h	be2134cced69bea1dea731f342425a27e1151037
+++ libpurple/dnsquery.h	9535c9eb1ab6c5e3a391ff5b8d9b148df37e745f
@@ -88,7 +88,7 @@ extern "C" {
 /**
  * Perform an asynchronous DNS query.
  *
- * @param account the account that the query is being done for (or NULL)
+ * @param account  The account that the query is being done for (or NULL)
  * @param hostname The hostname to resolve.
  * @param port     A port number which is stored in the struct sockaddr.
  * @param callback The callback function to call after resolving.
@@ -98,29 +98,10 @@ extern "C" {
  *         a data structure that can be used to cancel the pending
  *         DNS query, if needed.
  *
- * @since 2.8.0
  */
-PurpleDnsQueryData *purple_dnsquery_a_account(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
+PurpleDnsQueryData *purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
 
-#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_DNSQUERY_C_)
 /**
- * Perform an asynchronous DNS query.
- *
- * @param hostname The hostname to resolve.
- * @param port     A port number which is stored in the struct sockaddr.
- * @param callback The callback function to call after resolving.
- * @param data     Extra data to pass to the callback function.
- *
- * @return NULL if there was an error, otherwise return a reference to
- *         a data structure that can be used to cancel the pending
- *         DNS query, if needed.
- *
- * @deprecated Use purple_dnsquery_a_account instead
- */
-PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
-#endif
-
-/**
  * Cancel a DNS query and destroy the associated data structure.
  *
  * @param query_data The DNS query to cancel.  This data structure
============================================================
--- libpurple/protocols/jabber/google/jingleinfo.c	70a53ff970e3705a25a264c748dac2f57218ce70
+++ libpurple/protocols/jabber/google/jingleinfo.c	86aabf9b6bb82b51e1e3b357950e7e4dc758cb44
@@ -117,7 +117,7 @@ jabber_google_jingle_info_common(JabberS
 					purple_dnsquery_destroy(js->stun_query);
 
 				account = purple_connection_get_account(js->gc);
-				js->stun_query = purple_dnsquery_a_account(account, host, port,
+				js->stun_query = purple_dnsquery_a(account, host, port,
 					jabber_google_stun_lookup_cb, js);
 			}
 		}


More information about the Commits mailing list