# HG changeset patch # User Christian Hammond # Date 1053404057 0 # Node ID 40e976d420284586047a8040cbf3244cf5df7337 # Parent f9658a84d1ed77ab19906330415c1206e48f47d7 [gaim-migrate @ 5844] I *think* this will prevent errors with MsnUser not being set, and other stuff. We'll see. committer: Tailor Script diff -r f9658a84d1ed -r 40e976d42028 src/protocols/msn/notification.c --- a/src/protocols/msn/notification.c Tue May 20 03:33:13 2003 +0000 +++ b/src/protocols/msn/notification.c Tue May 20 04:14:17 2003 +0000 @@ -212,6 +212,8 @@ if (!g_ascii_strcasecmp(params[1], "OK")) { /* OK */ + session->syncing_lists = TRUE; + if (!msn_servconn_send_command(servconn, "SYN", "0")) { hide_login_progress(gc, _("Unable to write")); signoff(gc); @@ -581,7 +583,7 @@ passport = params[5]; friend = msn_url_decode(params[6]); - if (session->lists_synced) + if (session->syncing_lists && session->lists_synced) return TRUE; if (!g_ascii_strcasecmp(type, "FL") && user_num != 0) { @@ -655,18 +657,30 @@ if (user_num != num_users) return TRUE; /* This isn't the last one in the RL. */ - if (!msn_servconn_send_command(servconn, "CHG", "NLN")) { - hide_login_progress(gc, _("Unable to write")); - signoff(gc); + /* Now we're at the last one, so we can do final work. */ + if (!session->lists_synced) { + if (!msn_servconn_send_command(servconn, "CHG", "NLN")) { + hide_login_progress(gc, _("Unable to write")); + signoff(gc); - return FALSE; + return FALSE; + } + + account_online(gc); + serv_finish_login(gc); } - account_online(gc); - serv_finish_login(gc); + if (session->lists.allow == NULL) + session->lists.allow = g_slist_copy(gc->account->permit); + else + session->lists.allow = g_slist_concat(session->lists.allow, + gc->account->permit); - session->lists.allow = g_slist_copy(gc->account->permit); - session->lists.block = g_slist_copy(gc->account->deny); + if (session->lists.block == NULL) + session->lists.block = g_slist_copy(gc->account->deny); + else + session->lists.block = g_slist_concat(session->lists.block, + gc->account->deny); while (session->lists.forward != NULL) { MsnUser *user = session->lists.forward->data; @@ -720,7 +734,8 @@ (char *)msn_user_get_name(user)); } - session->lists_synced = TRUE; + session->syncing_lists = FALSE; + session->lists_synced = TRUE; } return TRUE; diff -r f9658a84d1ed -r 40e976d42028 src/protocols/msn/session.h --- a/src/protocols/msn/session.h Tue May 20 03:33:13 2003 +0000 +++ b/src/protocols/msn/session.h Tue May 20 04:14:17 2003 +0000 @@ -71,6 +71,7 @@ /* You have no idea how much I hate all that is below. */ GaimPlugin *prpl; + gboolean syncing_lists; gboolean lists_synced; /* For moving buddies from one group to another. Ugh. */