changeset 15007:a259abeeee27

[gaim-migrate @ 17788] This patch causes jabber to use DNS SRV lookups when registering jabber accounts. Thanks to George-Cristian BŹ«Ârzan for this. From Debian Bug #399230. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 20 Nov 2006 03:57:47 +0000
parents 3f639d4991cb
children 7589733ba1aa
files COPYRIGHT libgaim/protocols/jabber/jabber.c
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Nov 20 02:56:35 2006 +0000
+++ b/COPYRIGHT	Mon Nov 20 03:57:47 2006 +0000
@@ -26,6 +26,7 @@
 Brian Bernas
 Paul Betts
 Jonas Birmé
+George-Cristian Bîrzan
 Eric Blade
 Ethan Blanton
 Joshua Blanton
--- a/libgaim/protocols/jabber/jabber.c	Mon Nov 20 02:56:35 2006 +0000
+++ b/libgaim/protocols/jabber/jabber.c	Mon Nov 20 03:57:47 2006 +0000
@@ -926,10 +926,17 @@
 	}
 
 	if(!js->gsc) {
-		if (gaim_proxy_connect(gc, account, server,
-				gaim_account_get_int(account, "port", 5222),
-				jabber_login_callback, gc) == NULL)
-			gaim_connection_error(gc, _("Unable to create socket"));
+		if (connect_server[0]) {
+			jabber_login_connect(js, server,
+			                     gaim_account_get_int(account,
+			                                          "port", 5222));
+		} else {
+			js->srv_query_data = gaim_srv_resolve("xmpp-client",
+			                                      "tcp",
+			                                      js->user->domain,
+			                                      srv_resolved_cb,
+			                                      js);
+		}
 	}
 }