Mercurial > pidgin.yaz
changeset 25031:3cace6a9a28f
Minor formatting and comments
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 29 Jan 2009 08:23:27 +0000 |
parents | 986edbefc516 |
children | c434094cf298 |
files | libpurple/protocols/oscar/oscar.c |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Thu Jan 29 08:23:12 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Jan 29 08:23:27 2009 +0000 @@ -2143,30 +2143,35 @@ } else { purple_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE); } - + if (info->status != NULL && info->status[0] != '\0') - /* Grab the available message */ + /* Grab the available message */ message = oscar_encoding_to_utf8(account, info->status_encoding, info->status, info->status_len); - + tmp2 = tmp = (message ? g_markup_escape_text(message, -1) : NULL); - + if (strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE) == 0) { if (info->itmsurl_encoding && info->itmsurl && info->itmsurl_len) - /* Grab the iTunes Music Store URL */ + /* Grab the iTunes Music Store URL */ itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding, info->itmsurl, info->itmsurl_len); + if (tmp2 == NULL && itmsurl != NULL) + /* + * The message can't be NULL because NULL means it was the + * last attribute, so the itmsurl would get ignored below. + */ tmp2 = ""; - + purple_prpl_got_user_status(account, info->sn, status_id, "message", tmp2, "itmsurl", itmsurl, NULL); } else purple_prpl_got_user_status(account, info->sn, status_id, "message", tmp2, NULL); - + g_free(tmp); - + g_free(message); g_free(itmsurl);