--- a/libpurple/protocols/msn/session.c Mon Jul 19 18:25:47 2010 +0000 +++ b/libpurple/protocols/msn/session.c Mon Jul 19 21:11:32 2010 +0000 @@ -21,13 +21,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -#include "msn.h" + +#include "internal.h" +#include "debug.h" + +#include "error.h" +#include "msnutils.h" #include "session.h" #include "notification.h" #include "oim.h" -#include "dialog.h" - MsnSession * msn_session_new(PurpleAccount *account) { @@ -45,7 +48,9 @@ purple_account_get_username(account), NULL); session->oim = msn_oim_new(session); - session->protocol_ver = WLM_PROT_VER; + session->protocol_ver = 0; + + session->guid = rand_guid(); return session; } @@ -67,14 +72,11 @@ g_hash_table_destroy(session->soap_table); while (session->slplinks != NULL) - msn_slplink_destroy(session->slplinks->data); + msn_slplink_unref(session->slplinks->data); while (session->switches != NULL) msn_switchboard_destroy(session->switches->data); - if (session->sync != NULL) - msn_sync_destroy(session->sync); - if (session->oim != NULL) msn_oim_destroy(session->oim); @@ -82,7 +84,7 @@ msn_nexus_destroy(session->nexus); if (session->user != NULL) - msn_user_destroy(session->user); + msn_user_unref(session->user); if (session->notification != NULL) msn_notification_destroy(session->notification); @@ -90,6 +92,7 @@ msn_userlist_destroy(session->userlist); g_free(session->psm); + g_free(session->guid); g_free(session->abch_cachekey); #if 0 g_free(session->blocked_text); @@ -324,7 +327,7 @@ if (!found) { if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { /* The user is not on the server list */ - msn_show_sync_issue(session, buddy_name, group_name); + msn_error_sync_issue(session, buddy_name, group_name); } else { /* The user is not in that group on the server list */ to_remove = g_list_prepend(to_remove, buddy); @@ -478,6 +481,11 @@ msn_session_sync_users(session); } + if (session->protocol_ver >= 16) { + /* TODO: Send this when updating status instead? */ + msn_notification_send_uux_endpointdata(session); + msn_notification_send_uux_private_endpointdata(session); + } msn_change_status(session); }