changeset 31425:8fd65bb260cf

revert msn_set_public_alias() for now.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 02 Dec 2010 20:16:47 +0900
parents b11ce3aecca9
children 4635d84e3292
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Mon Nov 29 19:49:04 2010 +0900
+++ b/libpurple/protocols/msn/msn.c	Thu Dec 02 20:16:47 2010 +0900
@@ -250,7 +250,7 @@
 	MsnSession *session;
 	MsnTransaction *trans;
 	PurpleAccount *account;
-	char real_alias[BUDDY_ALIAS_MAXLEN+1];
+	const char *real_alias;
 	struct public_alias_closure *closure;
 	gchar *tmp;
 	gsize dummy;
@@ -268,7 +268,8 @@
 	else
 		real_alias = "";
 
-	if (*alias) {
+	if (strlen(real_alias) > BUDDY_ALIAS_MAXLEN)
+	{
 		if (failure_cb) {
 			struct public_alias_closure *closure =
 				g_new0(struct public_alias_closure, 1);
@@ -283,8 +284,8 @@
 		return;
 	}
 
-	if (real_alias[0] == '\0') {
-		strcpy(real_alias, purple_account_get_username(account));
+	if (*real_alias == '\0') {
+		real_alias = purple_url_encode(purple_account_get_username(account));
 	}
 
 	closure = g_new0(struct public_alias_closure, 1);