changeset 24758:041bb386bf96

merge of '52e2a425de43a95def135fff5a6dbe87ed39acb5' and 'f02bc5ac62535f523c8db8f5ee5ae43aa10bc614'
author John Bailey <rekkanoryo@rekkanoryo.org>
date Mon, 15 Dec 2008 04:25:00 +0000
parents 508e57943440 (diff) 6efcf61cf12b (current diff)
children cf626850031f
files ChangeLog
diffstat 5 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Dec 15 04:09:02 2008 +0000
+++ b/COPYRIGHT	Mon Dec 15 04:25:00 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:09:02 2008 +0000
+++ b/ChangeLog	Mon Dec 15 04:25:00 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:09:02 2008 +0000
+++ b/libpurple/dnssrv.c	Mon Dec 15 04:25:00 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/sametime/sametime.c	Mon Dec 15 04:09:02 2008 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Mon Dec 15 04:25:00 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:09:02 2008 +0000
+++ b/libpurple/protocols/simple/simple.c	Mon Dec 15 04:25:00 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]);