soc.2010.msn-tlc: 27a7cb54: Manage switchboards with users not on ou...
masca at cpw.pidgin.im
masca at cpw.pidgin.im
Thu May 27 16:31:09 EDT 2010
-----------------------------------------------------------------
Revision: 27a7cb54bf0445b92466fb27f237de5c8acdf3a1
Ancestor: e7bc0e114c246226f85788920fd3e3dd772f9dbc
Author: masca at cpw.pidgin.im
Date: 2010-05-26T23:47:19
Branch: im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/27a7cb54bf0445b92466fb27f237de5c8acdf3a1
Modified files:
libpurple/protocols/msn/switchboard.c
ChangeLog:
Manage switchboards with users not on our list.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/switchboard.c b1426806b0a22ff513410ae0eef8452a22390fa1
+++ libpurple/protocols/msn/switchboard.c 83c3ca16bf9e62336ce8985821307e69507cfad7
@@ -124,6 +124,7 @@ msn_switchboard_destroy(MsnSwitchBoard *
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 @@ msn_switchboard_add_user(MsnSwitchBoard
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 @@ msn_switchboard_add_user(MsnSwitchBoard
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);
More information about the Commits
mailing list