changeset 24724:6d57674c5fe3

merge of '8d8f6d7fcf4bbef4fe0e6f1008e25759c2b3932e' and 'eeaf58d4c47c6af0108ab03a8b6718dd51e9b487'
author Mark Doliner <mark@kingant.net>
date Mon, 15 Dec 2008 05:33:57 +0000
parents 68cc1a8a0d21 (current diff) cf626850031f (diff)
children a5f2536b911b 68f4edb42f39
files
diffstat 6 files changed, 41 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Dec 15 05:32:31 2008 +0000
+++ b/COPYRIGHT	Mon Dec 15 05:33:57 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 05:32:31 2008 +0000
+++ b/ChangeLog	Mon Dec 15 05:33:57 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 05:32:31 2008 +0000
+++ b/libpurple/dnssrv.c	Mon Dec 15 05:33:57 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/msn/session.c	Mon Dec 15 05:32:31 2008 +0000
+++ b/libpurple/protocols/msn/session.c	Mon Dec 15 05:33:57 2008 +0000
@@ -448,25 +448,23 @@
 	PurpleConnection *gc;
 	PurpleStoredImage *img;
 
-	msn_change_status(session);
-
-	if (session->logged_in)
-		return;
-
-	account = session->account;
-	gc = purple_account_get_connection(account);
+	if (!session->logged_in) {
+		account = session->account;
+		gc = purple_account_get_connection(account);
 
-	img = purple_buddy_icons_find_account_icon(session->account);
-	/* TODO: Do we really want to call this if img is NULL? */
-	msn_user_set_buddy_icon(session->user, img);
-	if (img != NULL)
-		purple_imgstore_unref(img);
+		img = purple_buddy_icons_find_account_icon(session->account);
+		/* TODO: Do we really want to call this if img is NULL? */
+		msn_user_set_buddy_icon(session->user, img);
+		if (img != NULL)
+			purple_imgstore_unref(img);
 
-	session->logged_in = TRUE;
+		session->logged_in = TRUE;
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
 
-	purple_connection_set_state(gc, PURPLE_CONNECTED);
+		/* Sync users */
+		msn_session_sync_users(session);
+	}
 
-	/* Sync users */
-	msn_session_sync_users(session);
+	msn_change_status(session);
 }
 
--- a/libpurple/protocols/sametime/sametime.c	Mon Dec 15 05:32:31 2008 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Mon Dec 15 05:33:57 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 05:32:31 2008 +0000
+++ b/libpurple/protocols/simple/simple.c	Mon Dec 15 05:33:57 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]);