Mercurial > pidgin.yaz
changeset 5456:40e976d42028
[gaim-migrate @ 5844]
I *think* this will prevent errors with MsnUser not being set, and other
stuff. We'll see.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 20 May 2003 04:14:17 +0000 |
parents | f9658a84d1ed |
children | c8c290021b7b |
files | src/protocols/msn/notification.c src/protocols/msn/session.h |
diffstat | 2 files changed, 26 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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. */