changeset 19612:2850f5eb314f

Set our alias using the appropriate function. This makes a copy of the string rather than just pointing alias to a variable within session which will eventually get free'd and leave account->alias pointing to deallocated memory.
author Mark Doliner <mark@kingant.net>
date Mon, 03 Sep 2007 18:46:28 +0000
parents 20dda83a6c67
children 2d4c626f60c1
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Mon Sep 03 18:15:55 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Mon Sep 03 18:46:28 2007 +0000
@@ -1444,7 +1444,7 @@
 
 	/* If a local alias wasn't set, set it to user's username. */
 	if (!session->account->alias || !strlen(session->account->alias))
-		session->account->alias = session->username;
+		purple_account_set_alias(session->account, session->username);
 
 	/* The session is now set up, ready to be connected. This emits the
 	 * signedOn signal, so clients can now do anything with msimprpl, and