Mercurial > pidgin.yaz
changeset 17422:59e09ff3490d
Handle new accounts with no buddies better - finish login when the first
group is received, this allows us to handle the GTC, BLP & PRP commands for
new accounts.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 27 May 2007 12:39:24 +0000 |
parents | c8891ebd48db |
children | ae30f9913bb4 |
files | libpurple/protocols/msn/notification.c libpurple/protocols/msn/sync.c |
diffstat | 2 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Sun May 27 01:41:02 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Sun May 27 12:39:24 2007 +0000 @@ -901,6 +901,7 @@ syn_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session; + MsnSync *sync; int total_users; session = cmdproc->session; @@ -919,22 +920,12 @@ total_users = atoi(cmd->params[2]); - if (total_users == 0) - { - msn_session_finish_login(session); - } - else - { - /* syn_table */ - MsnSync *sync; + sync = msn_sync_new(session); + sync->total_users = total_users; + sync->old_cbs_table = cmdproc->cbs_table; - sync = msn_sync_new(session); - sync->total_users = total_users; - sync->old_cbs_table = cmdproc->cbs_table; - - session->sync = sync; - cmdproc->cbs_table = sync->cbs_table; - } + session->sync = sync; + cmdproc->cbs_table = sync->cbs_table; } /**************************************************************************
--- a/libpurple/protocols/msn/sync.c Sun May 27 01:41:02 2007 +0000 +++ b/libpurple/protocols/msn/sync.c Sun May 27 12:39:24 2007 +0000 @@ -99,8 +99,19 @@ /* HACK */ if (group_id == 0) + { /* Group of ungroupped buddies */ + if (session->sync->total_users == 0) + { + cmdproc->cbs_table = session->sync->old_cbs_table; + + msn_session_finish_login(session); + + msn_sync_destroy(session->sync); + session->sync = NULL; + } return; + } if ((purple_find_group(name)) == NULL) {