# HG changeset patch # User Elliott Sales de Andrade # Date 1247375205 0 # Node ID 8accf7a2264c3714b2f6c3c63c317f662b7138ec # Parent 444542a4379075e5d74bfecdad431c50fada02f5 The MSN client and server strips leading and trailing whitespace, so do the same locally before setting it, so that people don't think that their name actually included any. Also, there's no need to call strlen() to check that the length > 0. Fixes #9447 in a way. diff -r 444542a43790 -r 8accf7a2264c libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sun Jul 12 04:41:10 2009 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Jul 12 05:06:45 2009 +0000 @@ -178,8 +178,12 @@ cmdproc = session->notification->cmdproc; account = purple_connection_get_account(gc); - if(entry && strlen(entry)) - alias = purple_url_encode(entry); + if (entry && *entry) + { + char *tmp = g_strdup(entry); + alias = purple_url_encode(g_strstrip(tmp)); + g_free(tmp); + } else alias = ""; @@ -195,7 +199,6 @@ } msn_cmdproc_send(cmdproc, "PRP", "MFN %s", alias); - } static void