changeset 27420:4475e746a34e

merge of '1490bc9b5da3684cfe634ae71d22e5903a639e7c' and '96fc49b5da18a0e87d5d8e5976ce7b6abd15bad3'
author Etan Reisner <pidgin@unreliablesource.net>
date Fri, 26 Jun 2009 23:32:51 +0000
parents dfa7d2a0d9b8 (diff) 552b5292f36f (current diff)
children 627a146aba2b
files
diffstat 10 files changed, 132 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 25 05:38:35 2009 +0000
+++ b/ChangeLog	Fri Jun 26 23:32:51 2009 +0000
@@ -18,6 +18,10 @@
 	  from you on MSN.
 	* DNS servers are re-read when DNS queries fail in case the system has
 	  moved to a new network and the old servers are not accessible.
+	* GnuTLS logging (disabled by default) can be controlled through the
+	  PURPLE_GNUTLS_DEBUG environment variable, which is an integer between
+	  0 and 9 (higher is more verbose). Higher values may reveal sensitive
+	  information.
 
 	Gadu-Gadu:
 	* Accounts can specify a server to which to connect.
--- a/libpurple/core.h	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/core.h	Fri Jun 26 23:32:51 2009 +0000
@@ -188,7 +188,9 @@
  *   <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd>
  *
  *   <dt><tt>client_type</tt></dt>
- *   <dd>the type of UI (pc, console, phone, handheld, web, bot)</dd>
+ *   <dd>the type of UI. Possible values include 'pc', 'console', 'phone',
+ *       'handheld', 'web', and 'bot'. These values are compared
+ *       programmatically and should not be localized.</dd>
  *   
  * </dl>
  *
--- a/libpurple/network.h	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/network.h	Fri Jun 26 23:32:51 2009 +0000
@@ -246,10 +246,10 @@
  * Update the TURN server IP given the host name
  * Will result in a DNS query being executed asynchronous
  * 
- * @param stun_server The host name of the STUN server to set
+ * @param turn_server The host name of the STUN server to set
  * @since 2.6.0
  */
-void purple_network_set_turn_server(const gchar *stun_server);
+void purple_network_set_turn_server(const gchar *turn_server);
 	
 /**
  * Get the IP address of the STUN server as a string representation
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Fri Jun 26 23:32:51 2009 +0000
@@ -43,8 +43,17 @@
 static gnutls_certificate_client_credentials xcred;
 
 static void
+ssl_gnutls_log(int level, const char *str)
+{
+	/* GnuTLS log messages include the '\n' */
+	purple_debug_misc("gnutls", "lvl %d: %s", level, str);
+}
+
+static void
 ssl_gnutls_init_gnutls(void)
 {
+	const char *debug_level;
+
 	/* Configure GnuTLS to use glib memory management */
 	/* I expect that this isn't really necessary, but it may prevent
 	   some bugs */
@@ -59,6 +68,20 @@
 		(gnutls_free_function)    g_free     /* free */
 		);
 
+	debug_level = g_getenv("PURPLE_GNUTLS_DEBUG");
+	if (debug_level) {
+		int level = atoi(debug_level);
+		if (level < 0) {
+			purple_debug_warning("gnutls", "Assuming log level 0 instead of %d\n",
+			                     level);
+			level = 0;
+		}
+
+		/* "The level is an integer between 0 and 9. Higher values mean more verbosity." */
+		gnutls_global_set_log_level(level);
+		gnutls_global_set_log_function(ssl_gnutls_log);
+	}
+
 	gnutls_global_init();
 
 	gnutls_certificate_allocate_credentials(&xcred);
--- a/libpurple/protocols/msn/cmdproc.c	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/protocols/msn/cmdproc.c	Fri Jun 26 23:32:51 2009 +0000
@@ -210,6 +210,7 @@
 
 	trans = g_new0(MsnTransaction, 1);
 
+	trans->cmdproc = cmdproc;
 	trans->command = g_strdup(command);
 
 	if (format != NULL)
--- a/libpurple/protocols/msn/history.c	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/protocols/msn/history.c	Fri Jun 26 23:32:51 2009 +0000
@@ -68,6 +68,7 @@
 msn_history_add(MsnHistory *history, MsnTransaction *trans)
 {
 	GQueue *queue;
+	int max_elems;
 
 	g_return_if_fail(history != NULL);
 	g_return_if_fail(trans   != NULL);
@@ -78,7 +79,12 @@
 
 	g_queue_push_tail(queue, trans);
 
-	if (queue->length > MSN_HIST_ELEMS)
+	if (trans->cmdproc->servconn->type == MSN_SERVCONN_NS)
+		max_elems = MSN_NS_HIST_ELEMS;
+	else
+		max_elems = MSN_SB_HIST_ELEMS;
+
+	if (queue->length > max_elems)
 	{
 		trans = g_queue_pop_head(queue);
 		msn_transaction_destroy(trans);
--- a/libpurple/protocols/msn/history.h	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/protocols/msn/history.h	Fri Jun 26 23:32:51 2009 +0000
@@ -24,7 +24,8 @@
 #ifndef _MSN_HISTORY_H
 #define _MSN_HISTORY_H
 
-#define MSN_HIST_ELEMS 0x30
+#define MSN_NS_HIST_ELEMS 0x300
+#define MSN_SB_HIST_ELEMS 0x30
 
 typedef struct _MsnHistory MsnHistory;
 
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Fri Jun 26 23:32:51 2009 +0000
@@ -1831,14 +1831,13 @@
 
 		pkt_to_send = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_ACC_15,
 			YAHOO_STATUS_AVAILABLE, yd->session_id);
-		yahoo_packet_hash(pkt_to_send, "ssssisi",
+		yahoo_packet_hash(pkt_to_send, "ssssis",
 			1, purple_normalize(account, purple_account_get_username(account)),
 			5, xfer->who,
 			265, xfer_data->xfer_peer_idstring,
 			27, xfer->filename,
 			249, xfer_data->info_val_249,
-			251, xfer_data->xfer_idstring_for_relay,
-			222, 3);
+			251, xfer_data->xfer_idstring_for_relay);
 
 		yahoo_packet_send_and_free(pkt_to_send, yd);
 
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Thu Jun 25 05:38:35 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Fri Jun 26 23:32:51 2009 +0000
@@ -110,6 +110,9 @@
 		l = l->next;
 	}
 
+	if (!who)
+		return;
+
 	if (!purple_privacy_check(purple_connection_get_account(gc), who)) {
 		purple_debug_info("yahoo", "Picture packet from %s dropped.\n", who);
 		return;
--- a/po/ca.po	Thu Jun 25 05:38:35 2009 +0000
+++ b/po/ca.po	Fri Jun 26 23:32:51 2009 +0000
@@ -33,8 +33,8 @@
 msgstr ""
 "Project-Id-Version: Pidgin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-06 22:44+0200\n"
-"PO-Revision-Date: 2009-06-06 22:51+0200\n"
+"POT-Creation-Date: 2009-06-25 21:33+0200\n"
+"PO-Revision-Date: 2009-06-25 21:44+0200\n"
 "Last-Translator: Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>\n"
 "Language-Team: Catalan <tradgnome@softcatala.net>\n"
 "MIME-Version: 1.0\n"
@@ -4254,8 +4254,9 @@
 msgid "Invalid XMPP ID. Domain must be set."
 msgstr "L'ID de l'XMPP no és vàlid. Cal especificar un domini."
 
-msgid "Malformed BOSH Connect Server"
-msgstr ""
+# FIX
+msgid "Malformed BOSH URL"
+msgstr "L'URL BOSH està malmès"
 
 #, c-format
 msgid "Registration of %s@%s successful"
@@ -4323,6 +4324,9 @@
 msgid "Change Registration"
 msgstr "Canvia el registre"
 
+msgid "Malformed BOSH Connect Server"
+msgstr "La connexió al servidor BOSH està malmesa"
+
 msgid "Error unregistering account"
 msgstr "S'ha produït un error en cancel·lar el registre"
 
@@ -4460,7 +4464,7 @@
 
 # FIX
 msgid "Malformed XMPP ID"
-msgstr "l'ID de l'XMPP està malmès"
+msgstr "L'ID de l'XMPP està malmès"
 
 msgid "Not Acceptable"
 msgstr "No és acceptable"
@@ -4767,6 +4771,9 @@
 msgid "File transfer proxies"
 msgstr "Servidors intermediari per a la transferència de fitxers"
 
+msgid "BOSH URL"
+msgstr "URL BOSH"
+
 #. this should probably be part of global smiley theme settings later on,
 #. shared with MSN
 msgid "Show Custom Smileys"
@@ -5524,32 +5531,6 @@
 msgid "The following users are missing from your addressbook"
 msgstr "Manquen aquests usuaris a la vostra llista d'amics"
 
-#, c-format
-msgid "Unable to add user on %s (%s)"
-msgstr "No s'ha pogut afegir l'usuari a %s (%s)"
-
-#, c-format
-msgid "Unable to block user on %s (%s)"
-msgstr "No s'ha pogut blocar l'usuari %s (%s)"
-
-#, c-format
-msgid "Unable to permit user on %s (%s)"
-msgstr "No s'ha pogut permetre l'usuari %s (%s)"
-
-#, c-format
-msgid "%s could not be added because your buddy list is full."
-msgstr "No s'ha pogut afegir %s perquè la llista és plena."
-
-#, c-format
-msgid "%s is not a valid passport account."
-msgstr "%s no és un compte de passaport vàlid."
-
-msgid "Service Temporarily Unavailable."
-msgstr "El servei no està disponible temporalment."
-
-msgid "Unknown error."
-msgstr "Error desconegut."
-
 msgid "Mobile message was not sent because it was too long."
 msgstr "No s'ha enviat el missatge al mòbil perquè era massa llarg."
 
@@ -5645,6 +5626,9 @@
 "La llista d'amics MSN està temporalment no disponible. Espereu i proveu-ho "
 "més tard."
 
+msgid "Unknown error."
+msgstr "Error desconegut."
+
 msgid "Handshaking"
 msgstr "S'està comprovant la conformitat de connexió"
 
@@ -5746,6 +5730,29 @@
 msgid "%s on %s (%s)"
 msgstr "%s a %s (%s)"
 
+#, c-format
+msgid "Unable to add user on %s (%s)"
+msgstr "No s'ha pogut afegir l'usuari a %s (%s)"
+
+#, c-format
+msgid "Unable to block user on %s (%s)"
+msgstr "No s'ha pogut blocar l'usuari %s (%s)"
+
+#, c-format
+msgid "Unable to permit user on %s (%s)"
+msgstr "No s'ha pogut permetre l'usuari %s (%s)"
+
+#, c-format
+msgid "%s could not be added because your buddy list is full."
+msgstr "No s'ha pogut afegir %s perquè la llista és plena."
+
+#, c-format
+msgid "%s is not a valid passport account."
+msgstr "%s no és un compte de passaport vàlid."
+
+msgid "Service Temporarily Unavailable."
+msgstr "El servei no està disponible temporalment."
+
 msgid "Unable to rename group"
 msgstr "No s'ha pogut canviar el nom del grup"
 
@@ -5843,14 +5850,16 @@
 
 #, c-format
 msgid ""
-"%s Your password is %d characters, greater than the expected maximum length "
-"of %d for MySpaceIM. Please shorten your password at http://profileedit."
-"myspace.com/index.cfm?fuseaction=accountSettings.changePassword and try "
-"again."
-msgstr ""
-"%s La vostra contrasenya conté %d caràcters, més del màxim de %d que permet "
-"MySpaceIM. Escolliu una contrasenya més curta a http://profileedit.myspace."
-"com/index.cfm?fuseaction=accountSettings.changePassword i proveu-ho de nou."
+"%s Your password is %zu characters, which is longer than the maximum length "
+"of %d.  Please shorten your password at http://profileedit.myspace.com/index."
+"cfm?fuseaction=accountSettings.changePassword and try again."
+msgstr ""
+"%s La vostra contrasenya conté %zu caràcters, més %d que és el màxim permès. "
+"Escolliu una contrasenya més curta a http://profileedit.myspace.com/index."
+"cfm?fuseaction=accountSettings.changePassword i proveu-ho de nou."
+
+msgid "Incorrect username or password"
+msgstr "El sobrenom o la contrasenya no són correctes"
 
 msgid "MySpaceIM Error"
 msgstr "S'ha produït un error en el MySpaceIM"
@@ -6174,9 +6183,6 @@
 msgid "Master archive is misconfigured"
 msgstr "L'arxiu mestre està desconfigurat"
 
-msgid "Incorrect username or password"
-msgstr "El sobrenom o la contrasenya no són correctes"
-
 msgid "Could not recognize the host of the username you entered"
 msgstr "No s'ha pogut reconèixer l'ordinador del nom d'usuari que heu entrat"
 
@@ -6707,6 +6713,31 @@
 "començar amb una lletra i contenir només lletres, nombres o espais, o només "
 "nombres."
 
+#, c-format
+msgid "You may be disconnected shortly.  If so, check %s for updates."
+msgstr ""
+"Pot ser que es desconnecti d'aquí a poc. Si això passés, comproveu si hi ha "
+"actualitzacions a %s."
+
+# FIXME: hash (josep)
+msgid "Unable to get a valid AIM login hash."
+msgstr "No s'ha pogut obtenir un hash d'AIM d'entrada vàlid."
+
+#, c-format
+msgid "You may be disconnected shortly.  Check %s for updates."
+msgstr ""
+"Se us pot desconnectar d'aquí a poc temps. Comproveu si hi ha "
+"actualitzacions a %s."
+
+msgid "Unable to get a valid login hash."
+msgstr "No s'ha pogut obtenir un hash d'entrada vàlid."
+
+msgid "Could Not Connect"
+msgstr "No s'ha pogut connectar"
+
+msgid "Received authorization"
+msgstr "S'ha rebut l'autorització"
+
 #. Unregistered username
 #. uid is not exist
 msgid "Invalid username."
@@ -6725,7 +6756,6 @@
 "El servei de missatges instantanis d'AOL no està disponible temporalment."
 
 #. username connecting too frequently
-#. IP address connecting too frequently
 msgid ""
 "You have been connecting and disconnecting too frequently. Wait ten minutes "
 "and try again. If you continue to try, you will need to wait even longer."
@@ -6738,11 +6768,14 @@
 msgid "The client version you are using is too old. Please upgrade at %s"
 msgstr "La versió del client que useu és massa antiga, actualitzeu-la a %s"
 
-msgid "Could Not Connect"
-msgstr "No s'ha pogut connectar"
-
-msgid "Received authorization"
-msgstr "S'ha rebut l'autorització"
+#. IP address connecting too frequently
+msgid ""
+"You have been connecting and disconnecting too frequently. Wait a minute and "
+"try again. If you continue to try, you will need to wait even longer."
+msgstr ""
+"Heu estat connectant-vos i desconnectat-vos amb massa freqüència. Espereu un "
+"minut i intenteu-ho de nou. Si continueu intentant-ho, haureu d'esperar "
+"encara més temps."
 
 msgid "The SecurID key entered is invalid."
 msgstr "La clau SecurID que heu entrat no és vàlida."
@@ -6759,25 +6792,6 @@
 msgid "_OK"
 msgstr "_D'acord"
 
-#, c-format
-msgid "You may be disconnected shortly.  If so, check %s for updates."
-msgstr ""
-"Pot ser que es desconnecti d'aquí a poc. Si això passés, comproveu si hi ha "
-"actualitzacions a %s."
-
-# FIXME: hash (josep)
-msgid "Unable to get a valid AIM login hash."
-msgstr "No s'ha pogut obtenir un hash d'AIM d'entrada vàlid."
-
-#, c-format
-msgid "You may be disconnected shortly.  Check %s for updates."
-msgstr ""
-"Se us pot desconnectar d'aquí a poc temps. Comproveu si hi ha "
-"actualitzacions a %s."
-
-msgid "Unable to get a valid login hash."
-msgstr "No s'ha pogut obtenir un hash d'entrada vàlid."
-
 msgid "Password sent"
 msgstr "S'ha enviat la contrasenya"
 
@@ -7282,6 +7296,7 @@
 msgid "Set User Info (web)..."
 msgstr "Estableix informació d'usuari (web)..."
 
+#. This only happens when connecting with the old-style BUCP login
 msgid "Change Password (web)"
 msgstr "Canvia la contrasenya (web)"
 
@@ -7311,6 +7326,9 @@
 msgid "Search for Buddy by Information"
 msgstr "Cerca un amic per la informació"
 
+msgid "Use clientLogin"
+msgstr "Empra clientLogin"
+
 msgid ""
 "Always use AIM/ICQ proxy server for\n"
 "file transfers and direct IM (slower,\n"