Mercurial > pidgin
comparison src/protocols/msn/notification.c @ 6833:ccfbd7c552ba
[gaim-migrate @ 7378]
Parse the MSNObject after setting the friendly name. This prevents the
MSNObject from appearing as the friendly name in the tooltip, due to
msn_url_decode using static buffers.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sun, 14 Sep 2003 04:55:36 +0000 |
| parents | 7ed61a258cb2 |
| children | 885c6528843b |
comparison
equal
deleted
inserted
replaced
| 6832:f03c0085c424 | 6833:ccfbd7c552ba |
|---|---|
| 1050 | 1050 |
| 1051 state = params[1]; | 1051 state = params[1]; |
| 1052 passport = params[2]; | 1052 passport = params[2]; |
| 1053 friend = msn_url_decode(params[3]); | 1053 friend = msn_url_decode(params[3]); |
| 1054 | 1054 |
| 1055 serv_got_alias(gc, (char *)passport, (char *)friend); | |
| 1056 | |
| 1055 if (session->protocol_ver >= 9 && param_count == 6) | 1057 if (session->protocol_ver >= 9 && param_count == 6) |
| 1056 { | 1058 { |
| 1057 user = msn_users_find_with_passport(session->users, passport); | 1059 user = msn_users_find_with_passport(session->users, passport); |
| 1058 | 1060 |
| 1059 msnobj = msn_object_new_from_string(msn_url_decode(params[5])); | 1061 msnobj = msn_object_new_from_string(msn_url_decode(params[5])); |
| 1060 msn_user_set_object(user, msnobj); | 1062 msn_user_set_object(user, msnobj); |
| 1061 } | 1063 } |
| 1062 | |
| 1063 serv_got_alias(gc, (char *)passport, (char *)friend); | |
| 1064 | 1064 |
| 1065 if ((b = gaim_find_buddy(gc->account, passport)) != NULL) | 1065 if ((b = gaim_find_buddy(gc->account, passport)) != NULL) |
| 1066 status |= ((((b->uc) >> 1) & 0xF0) << 1); | 1066 status |= ((((b->uc) >> 1) & 0xF0) << 1); |
| 1067 | 1067 |
| 1068 if (!g_ascii_strcasecmp(state, "BSY")) | 1068 if (!g_ascii_strcasecmp(state, "BSY")) |
| 1469 | 1469 |
| 1470 state = params[0]; | 1470 state = params[0]; |
| 1471 passport = params[1]; | 1471 passport = params[1]; |
| 1472 friend = msn_url_decode(params[2]); | 1472 friend = msn_url_decode(params[2]); |
| 1473 | 1473 |
| 1474 serv_got_alias(gc, (char *)passport, (char *)friend); | |
| 1475 | |
| 1474 if (session->protocol_ver >= 9 && param_count == 5) | 1476 if (session->protocol_ver >= 9 && param_count == 5) |
| 1475 { | 1477 { |
| 1476 user = msn_users_find_with_passport(session->users, passport); | 1478 user = msn_users_find_with_passport(session->users, passport); |
| 1477 | 1479 |
| 1478 msnobj = msn_object_new_from_string(msn_url_decode(params[4])); | 1480 msnobj = msn_object_new_from_string(msn_url_decode(params[4])); |
| 1479 msn_user_set_object(user, msnobj); | 1481 msn_user_set_object(user, msnobj); |
| 1480 } | 1482 } |
| 1481 | |
| 1482 serv_got_alias(gc, (char *)passport, (char *)friend); | |
| 1483 | 1483 |
| 1484 if (!g_ascii_strcasecmp(state, "BSY")) | 1484 if (!g_ascii_strcasecmp(state, "BSY")) |
| 1485 status |= UC_UNAVAILABLE | (MSN_BUSY << 1); | 1485 status |= UC_UNAVAILABLE | (MSN_BUSY << 1); |
| 1486 else if (!g_ascii_strcasecmp(state, "IDL")) | 1486 else if (!g_ascii_strcasecmp(state, "IDL")) |
| 1487 status |= UC_UNAVAILABLE | (MSN_IDLE << 1); | 1487 status |= UC_UNAVAILABLE | (MSN_IDLE << 1); |
