aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/msn.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-18 20:21:44 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-18 20:21:44 +0100
commit80175a1558f297d5505ed4e91a261781ec9c65a2 (patch)
tree64858b0b395fa81b0aae9b101c897ab4dd79a6ea /protocols/msn/msn.c
parente0e15468835d5ae5bce54a28bd7a5b7aea66a1e2 (diff)
Fetch the user's profile to see if there's a display name set there. If
there is, the one in the address book should be ignored. No support for changing the profile yet though.
Diffstat (limited to 'protocols/msn/msn.c')
-rw-r--r--protocols/msn/msn.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c
index 873a51ad..4b79cc26 100644
--- a/protocols/msn/msn.c
+++ b/protocols/msn/msn.c
@@ -82,6 +82,7 @@ static void msn_logout( struct im_connection *ic )
{
struct msn_data *md = ic->proto_data;
GSList *l;
+ int i;
if( md )
{
@@ -106,9 +107,8 @@ static void msn_logout( struct im_connection *ic )
msn_msgq_purge( ic, &md->msgq );
- g_free( md->tokens[0] );
- g_free( md->tokens[1] );
- g_free( md->tokens[2] );
+ for( i = 0; i < sizeof( md->tokens ) / sizeof( md->tokens[0] ); i ++ )
+ g_free( md->tokens[i] );
g_free( md->lock_key );
while( md->groups )
@@ -336,6 +336,7 @@ static char *set_eval_display_name( set_t *set, char *value )
{
account_t *acc = set->data;
struct im_connection *ic = acc->ic;
+ struct msn_data *md = ic->proto_data;
if( strlen( value ) > 129 )
{
@@ -343,6 +344,10 @@ static char *set_eval_display_name( set_t *set, char *value )
return NULL;
}
+ if( md->flags & MSN_GOT_PROFILE_DN )
+ imcb_log( ic, "Warning: Persistent name changes for this account have to be done "
+ "in the profile. BitlBee doesn't currently support this." );
+
msn_soap_addressbook_set_display_name( ic, value );
return msn_ns_set_display_name( ic, value ) ? value : NULL;
}