Mercurial > pidgin.yaz
changeset 31178:2cbcac894042
Manage switchboards with users not on our list.
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 26 May 2010 23:47:19 +0000 |
parents | f89094d6f8d5 |
children | 417899347f8a |
files | libpurple/protocols/msn/switchboard.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/switchboard.c Wed May 26 23:39:02 2010 +0000 +++ b/libpurple/protocols/msn/switchboard.c Wed May 26 23:47:19 2010 +0000 @@ -124,6 +124,7 @@ g_free(swboard->session_id); for (; swboard->users; swboard->users = g_list_delete_link(swboard->users, swboard->users)) + msn_user_unref(swboard->users->data); session = swboard->session; session->switches = g_list_remove(session->switches, swboard); @@ -261,9 +262,6 @@ userlist = swboard->session->userlist; msnuser = msn_userlist_find_user(userlist, passport); - if (!msnuser) - purple_debug_error("msn","User %s is not on our list.\n", passport); - /* Don't add multiple endpoints to the conversation. */ if (g_list_find_custom(swboard->users, passport, (GCompareFunc)user_passport_cmp)) { g_free(passport); @@ -276,6 +274,12 @@ return; } + if (!msnuser) { + purple_debug_info("msn","User %s is not on our list.\n", passport); + msnuser = msn_user_new(userlist, passport, NULL); + } else + msn_user_ref(msnuser); + g_free(passport); swboard->users = g_list_prepend(swboard->users, msnuser);