changeset 28426:3a8d2927dc2b

merge of '7df8a2a726d522f0120b6cec62f683503591a040' and '84b498a1a946a202a794740f53b1086b9e22343c'
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Sat, 24 Oct 2009 07:57:34 +0000
parents 44cbfcaf9e3a (diff) 335062a2d305 (current diff)
children f0d103b366df
files
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Oct 24 07:55:19 2009 +0000
+++ b/ChangeLog	Sat Oct 24 07:57:34 2009 +0000
@@ -16,6 +16,7 @@
 	* Fix a random crash that might occur when idle.
 	* Fix more FQY 240 connection errors.
 	* Fix a crash that could occur when adding a buddy.
+	* Fix an occasional crash when sending message to an offline user.
 
 	XMPP:
 	* Users connecting to Google Talk now have an "Initiate Chat" context menu
--- a/libpurple/protocols/msn/oim.c	Sat Oct 24 07:55:19 2009 +0000
+++ b/libpurple/protocols/msn/oim.c	Sat Oct 24 07:57:34 2009 +0000
@@ -153,7 +153,7 @@
 	gpointer cb_data;
 } MsnOimRequestData;
 
-static void msn_oim_request_helper(MsnOimRequestData *data);
+static gboolean msn_oim_request_helper(MsnOimRequestData *data);
 
 static void
 msn_oim_request_cb(MsnSoapMessage *request, MsnSoapMessage *response,
@@ -202,7 +202,7 @@
 	g_free(data);
 }
 
-static void
+static gboolean
 msn_oim_request_helper(MsnOimRequestData *data)
 {
 	MsnSession *session = data->oim->session;
@@ -224,13 +224,13 @@
 		const char *msn_p;
 
 		token = msn_nexus_get_token(session->nexus, MSN_AUTH_MESSENGER_WEB);
-		g_return_if_fail(token != NULL);
+		g_return_val_if_fail(token != NULL, FALSE);
 
 		msn_t = g_hash_table_lookup(token, "t");
 		msn_p = g_hash_table_lookup(token, "p");
 
-		g_return_if_fail(msn_t != NULL);
-		g_return_if_fail(msn_p != NULL);
+		g_return_val_if_fail(msn_t != NULL, FALSE);
+		g_return_val_if_fail(msn_p != NULL, FALSE);
 
 		passport = xmlnode_get_child(data->body, "Header/PassportCookie");
 		xml_t = xmlnode_get_child(passport, "t");
@@ -248,6 +248,8 @@
 		msn_soap_message_new(data->action, xmlnode_copy(data->body)),
 		data->host, data->url, FALSE,
 		msn_oim_request_cb, data);
+
+	return FALSE;
 }