diff src/protocols/msn/msn.c @ 10568:fed2a7c2471d

[gaim-migrate @ 11954] Some MSN bits: - Fix HTTP Method works when using an HTTP proxy that require authentication (Bastien Durel) - Better error reporting when the MSN servers are temporarily unavailable - Prevent zombie failed switchboard connections swallowing up messages - Fix win32 crashes receiving messages from aMSN with no formatting info - Fix a crash when the connection to the nexus server fails - maybe some other stuff, I forgot how much had piled up committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 03 Feb 2005 19:47:52 +0000
parents ace8cd0de6ea
children 0f7452b1f777
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Thu Feb 03 15:37:13 2005 +0000
+++ b/src/protocols/msn/msn.c	Thu Feb 03 19:47:52 2005 +0000
@@ -687,7 +687,8 @@
 	if (strcmp(username, gaim_account_get_username(account)))
 		gaim_account_set_username(account, username);
 
-	msn_session_connect(session, host, port, http_method);
+	if (!msn_session_connect(session, host, port, http_method))
+		gaim_connection_error(gc, _("Failed to connect to server."));
 }
 
 static void
@@ -755,7 +756,8 @@
 
 		format = msn_message_get_attr(msg, "X-MMS-IM-Format");
 		msn_parse_format(format, &pre, &post);
-		body_str = g_strdup_printf("%s%s%s", pre, body_enc, post);
+		body_str = g_strdup_printf("%s%s%s", pre ? pre :  "",
+								   body_enc ? body_enc : "", post ? post : "");
 		g_free(body_enc);
 		g_free(pre);
 		g_free(post);