Mercurial > pidgin
changeset 32485:d1ac0c771e19
Fix UBX on MSNP18.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 03 Feb 2012 01:26:14 +0000 |
parents | 0ab12023a1bc |
children | 1a265986ed37 |
files | libpurple/protocols/msn/notification.c |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Fri Feb 03 01:14:41 2012 +0000 +++ b/libpurple/protocols/msn/notification.c Fri Feb 03 01:26:14 2012 +0000 @@ -1705,13 +1705,19 @@ { MsnSession *session; MsnUser *user; - const char *passport; + char *passport; + int network; xmlnode *payloadNode; char *psm_str, *str; session = cmdproc->session; - passport = cmd->params[0]; + if (session->protocol_ver >= 18) { + str = cmd->params[0]; + msn_parse_user(str, &passport, &network); + } else { + passport = cmd->params[0]; + } user = msn_userlist_find_user(session->userlist, passport); if (user == NULL) { char *str = g_strndup(payload, len); @@ -1721,6 +1727,9 @@ return; } + if (session->protocol_ver >= 18) + g_free(passport); + /* Free any existing media info for this user */ if (user->extinfo) { g_free(user->extinfo->media_album); @@ -1767,7 +1776,10 @@ { purple_debug_misc("msn", "UBX received.\n"); cmdproc->last_cmd->payload_cb = ubx_cmd_post; - cmd->payload_len = atoi(cmd->params[2]); + if (cmdproc->session->protocol_ver >= 18) + cmd->payload_len = atoi(cmd->params[1]); + else + cmd->payload_len = atoi(cmd->params[2]); } static void