changeset 17011:e44a272b27a8

merge of '41f3a410baa40935d56c676abbf69c92987f86b7' and 'b8101f7594a660d5b9f9a0a1ad0e740ed9a78364'
author Nathan Walp <nwalp@pidgin.im>
date Fri, 11 May 2007 00:16:58 +0000
parents 0682981f6797 (current diff) 37a2d6eadd34 (diff)
children b713af8ae274
files
diffstat 4 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Fri May 11 00:31:06 2007 +0000
+++ b/libpurple/protocols/jabber/auth.c	Fri May 11 00:16:58 2007 +0000
@@ -291,12 +291,15 @@
 				 * plaintext auth
 				 */
 				} else if (!plaintext) {
+					char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
+							js->user->domain);
 					purple_request_yes_no(js->gc, _("Plaintext Authentication"),
 							_("Plaintext Authentication"),
-							_("This server requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
+							msg,
 							2, js->gc->account, NULL, NULL, NULL,
 							allow_cyrus_plaintext_auth,
 							disallow_plaintext_auth);
+					g_free(msg);
 					return;
 				/* Everything else has failed, so fail the
 				 * connection. Should probably have a better
@@ -477,13 +480,16 @@
 		js->auth_type = JABBER_AUTH_PLAIN;
 
 		if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, "auth_plain_in_clear", FALSE)) {
+			char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
+					js->user->domain);
 			purple_request_yes_no(js->gc, _("Plaintext Authentication"),
 					_("Plaintext Authentication"),
-					_("This server requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
+					msg,
 					2,
 					purple_connection_get_account(js->gc), NULL, NULL,
 					purple_connection_get_account(js->gc), allow_plaintext_auth,
 					disallow_plaintext_auth);
+			g_free(msg);
 			return;
 		}
 		finish_plaintext_authentication(js);
--- a/libpurple/protocols/jabber/buddy.c	Fri May 11 00:31:06 2007 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Fri May 11 00:16:58 2007 +0000
@@ -1195,7 +1195,7 @@
 
 		/* this is to fix the feeling of irritation I get when trying
 		 * to get info on a friend running Trillian, which doesn't
-		 * respont (with an error or otherwise) to jabber:iq:last
+		 * respond (with an error or otherwise) to jabber:iq:last
 		 * requests.  There are a number of Trillian users in my
 		 * office. */
 		if(!_client_is_blacklisted(jbr, "jabber:iq:last")) {
--- a/libpurple/protocols/jabber/jabber.c	Fri May 11 00:31:06 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri May 11 00:16:58 2007 +0000
@@ -508,13 +508,13 @@
 			jabber_login_callback_ssl, jabber_ssl_connect_failure, js->gc);
 }
 
-static void jabber_login_connect(JabberStream *js, const char *server, int port)
+static void jabber_login_connect(JabberStream *js, const char *fqdn, const char *host, int port)
 {
 #ifdef HAVE_CYRUS_SASL
-	js->serverFQDN = g_strdup(server);
+	js->serverFQDN = g_strdup(fqdn);
 #endif
 
-	if (purple_proxy_connect(js->gc, js->gc->account, server,
+	if (purple_proxy_connect(js->gc, js->gc->account, host,
 			port, jabber_login_callback, js->gc) == NULL)
 		purple_connection_error(js->gc, _("Unable to create socket"));
 }
@@ -527,10 +527,10 @@
 	js->srv_query_data = NULL;
 
 	if(results) {
-		jabber_login_connect(js, resp->hostname, resp->port);
+		jabber_login_connect(js, resp->hostname, resp->hostname, resp->port);
 		g_free(resp);
 	} else {
-		jabber_login_connect(js, js->user->domain,
+		jabber_login_connect(js, js->user->domain, js->user->domain,
 			purple_account_get_int(js->gc->account, "port", 5222));
 	}
 }
@@ -604,7 +604,7 @@
 	 * invoke the magic of SRV lookups, to figure out host and port */
 	if(!js->gsc) {
 		if(connect_server[0]) {
-			jabber_login_connect(js, connect_server, purple_account_get_int(account, "port", 5222));
+			jabber_login_connect(js, js->user->domain, connect_server, purple_account_get_int(account, "port", 5222));
 		} else {
 			js->srv_query_data = purple_srv_resolve("xmpp-client",
 					"tcp", js->user->domain, srv_resolved_cb, js);
@@ -949,7 +949,7 @@
 
 	if(!js->gsc) {
 		if (connect_server[0]) {
-			jabber_login_connect(js, server,
+			jabber_login_connect(js, js->user->domain, server,
 			                     purple_account_get_int(account,
 			                                          "port", 5222));
 		} else {
--- a/libpurple/protocols/jabber/presence.c	Fri May 11 00:31:06 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri May 11 00:16:58 2007 +0000
@@ -391,7 +391,7 @@
 		static int i = 1;
 		char *room_jid = g_strdup_printf("%s@%s", jid->node, jid->domain);
 
-		if(state == JABBER_BUDDY_STATE_ERROR && jid->resource == NULL) {
+		if(state == JABBER_BUDDY_STATE_ERROR) {
 			char *title, *msg = jabber_parse_error(js, packet);
 
 			if(chat->conv) {