changeset 19657:9cc67c3d145e

merge of 'cce02af7eb2fb114cb0f640979554b7de3a80e96' and 'db5ad5300e844751f9abf8702f4e4a8369dfef8e'
author Ka-Hing Cheung <khc@hxbc.us>
date Thu, 06 Sep 2007 06:26:32 +0000
parents 9968fff36e20 (diff) 1729367f0a4f (current diff)
children 1525c75849cc
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Wed Sep 05 23:51:16 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Thu Sep 06 06:26:32 2007 +0000
@@ -1543,6 +1543,12 @@
 
 	if (msim_msg_get_integer(msg, "uniquenick") == session->userid) {
 		purple_debug_info("msim_we_are_logged_on", "TODO: pick username\n");
+		/* No username is set. */
+		purple_notify_error(session->account, 
+				_("No username set"),
+				_("Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile.username and choose a username and try to login again."), NULL);
+		purple_connection_error(session->gc, _("No username set"));
+		return FALSE;
 	}
 
 	body = msim_msg_new(
@@ -1864,9 +1870,14 @@
 		purple_debug_info("msim", "msim_status: found buddy %s\n", username);
 	}
 
-	/* The status headline is plaintext, but libpurple treats it as HTML,
-	 * so escape any HTML characters to their entity equivalents. */
-	status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline));
+	if (status_headline) {
+		/* The status headline is plaintext, but libpurple treats it as HTML,
+		 * so escape any HTML characters to their entity equivalents. */
+		status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline));
+	} else {
+		status_headline_escaped = NULL;
+	}
+
 	g_free(status_headline);
 
 	if (user->headline)