changeset 24723:cf626850031f

merge of '3b87c3b008c11c068a42eba55b3f5724cdac4ad4' and '5255dae1217b713f7cdd700364fa47efe0a98560'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 15 Dec 2008 04:35:27 +0000
parents 041bb386bf96 (diff) 39bd04a550a4 (current diff)
children 6d57674c5fe3 25667ca518d6
files
diffstat 6 files changed, 32 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Dec 15 04:34:24 2008 +0000
+++ b/COPYRIGHT	Mon Dec 15 04:35:27 2008 +0000
@@ -272,6 +272,7 @@
 David Mohr
 Andrew Molloy
 Michael Monreal
+Laurent Montaron
 Marco Monteiro
 Benjamin Moody
 John Moody
--- a/ChangeLog	Mon Dec 15 04:34:24 2008 +0000
+++ b/ChangeLog	Mon Dec 15 04:35:27 2008 +0000
@@ -7,7 +7,6 @@
 	  notifications when the same buddy is in multiple groups (Florian Quèze)
 	* The Buddy State Notification plugin no longer turns JID's, MSN Passport
 	  ID's, etc. into links (Florian Quèze)
-	* Fix a crash in SIMPLE when a malformed message is received.
 	* purple-remote now has a "getstatusmessage" command to retrieve the text
 	  of the current status message.
 	* Various fixes to the nullprpl (Paul Aurich)
@@ -22,6 +21,9 @@
 	  (Jaromír Karmazín)
 	* Many QQ fixes and improvements, including the ability to connect
 	  using QQ2008 protocol and sending/receiving of long messages.
+	* Fix a crash with DNS SRV lookups (Florian Quèze)
+	* Fix insanely long idle times for Sametime 7.5 buddies by assuming 0 idle
+	  time if the idle timestamp is in the future (Laurent Montaron)
 
 	Gadu-Gadu:
 	* Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
@@ -44,6 +46,11 @@
 	  now be handled correctly.
 	* Many other fixes and code cleanup.
 
+	SIMPLE:
+	* Fix a crash when a malformed message is received.
+	* Don't allow connecting accounts if no server name has been specified
+	  (Florian Quèze)
+
 	XMPP:
 	* Fix the namespace URL we look for in PEP reply stanzas to match the URL
 	  used in the 'get' requests (Paul Aurich)
--- a/libpurple/dnssrv.c	Mon Dec 15 04:34:24 2008 +0000
+++ b/libpurple/dnssrv.c	Mon Dec 15 04:35:27 2008 +0000
@@ -336,6 +336,12 @@
 	static gboolean initialized = FALSE;
 #endif
 
+	if (!protocol || !*protocol || !transport || !*transport || !domain || !*domain) {
+		purple_debug_error("dnssrv", "Wrong arguments\n");
+		cb(NULL, 0, extradata);
+		g_return_val_if_reached(NULL);
+	}
+
 	query = g_strdup_printf("_%s._%s.%s", protocol, transport, domain);
 	purple_debug_info("dnssrv","querying SRV record for %s\n", query);
 
--- a/libpurple/protocols/myspace/message.c	Mon Dec 15 04:34:24 2008 +0000
+++ b/libpurple/protocols/myspace/message.c	Mon Dec 15 04:35:27 2008 +0000
@@ -23,6 +23,7 @@
 #include "message.h"
 
 static void msim_msg_free_element(gpointer data, gpointer user_data);
+static MsimMessage *msim_msg_append_dynamic_name(MsimMessage *msg, gchar *name, MsimMessageType type, gpointer data);
 static void msim_msg_debug_string_element(gpointer data, gpointer user_data);
 static gchar *msim_msg_pack_using(MsimMessage *msg, GFunc gf, const gchar *sep, const gchar *begin, const gchar *end);
 static GList *msim_msg_get_node(MsimMessage *msg, const gchar *name);
@@ -357,7 +358,10 @@
 
 	/* Append cloned data. Note that the 'name' field is a static string, so it
 	 * never needs to be copied nor freed. */
-	*new = msim_msg_append(*new, elem->name, elem->type, new_data);
+	if (elem->dynamic_name)
+		*new = msim_msg_append_dynamic_name(*new, g_strdup(elem->name), elem->type, new_data);
+	else
+		*new = msim_msg_append(*new, elem->name, elem->type, new_data);
 }
 
 /** Clone an existing MsimMessage. 
--- a/libpurple/protocols/sametime/sametime.c	Mon Dec 15 04:34:24 2008 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Mon Dec 15 04:35:27 2008 +0000
@@ -514,6 +514,11 @@
     idle_len = time(NULL) - idle;
     ugly_idle_len = ((time(NULL) * 1000) - idle) / 1000;
 
+	if(idle > ugly_idle_len)
+		ugly_idle_len = 0;
+	else
+		ugly_idle_len = (ugly_idle_len - idle) / 1000;
+
     /* 
        what's the deal here? Well, good clients are smart enough to
        publish their idle time by using an attribute to indicate that
--- a/libpurple/protocols/simple/simple.c	Mon Dec 15 04:34:24 2008 +0000
+++ b/libpurple/protocols/simple/simple.c	Mon Dec 15 04:35:27 2008 +0000
@@ -1939,6 +1939,13 @@
 		sip->txbuf = purple_circ_buffer_new(0);
 
 	userserver = g_strsplit(username, "@", 2);
+	if (userserver[1] == NULL || userserver[1][0] == '\0') {
+		purple_connection_error_reason(gc,
+			PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
+			_("SIP connect server not specified"));
+		return;
+	}
+
 	purple_connection_set_display_name(gc, userserver[0]);
 	sip->username = g_strdup(userserver[0]);
 	sip->servername = g_strdup(userserver[1]);