Mercurial > pidgin.yaz
changeset 17817:210fc36306e4
Don't retrieve hotmail authorization info for non-hotmail accounts. Fixes #1580
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 10 Jun 2007 17:18:43 +0000 |
parents | 60bc2827d0e7 |
children | 42a6171a3b25 |
files | libpurple/protocols/msn/notification.c libpurple/protocols/msn/session.c |
diffstat | 2 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Sun Jun 10 15:59:10 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Jun 10 17:18:43 2007 +0000 @@ -591,12 +591,23 @@ static void qng_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { + MsnSession *session; static int count = 0; - MsnSession *session = cmdproc->session; + const char *passport; + PurpleAccount *account; + + session = cmdproc->session; + account = session->account; if (session->passport_info.file == NULL) return; + passport = purple_normalize(account, purple_account_get_username(account)); + + if ((strstr(passport, "@hotmail.") != NULL) || + (strstr(passport, "@msn.com") != NULL)) + return; + if (count++ < 26) return;
--- a/libpurple/protocols/msn/session.c Sun Jun 10 15:59:10 2007 +0000 +++ b/libpurple/protocols/msn/session.c Sun Jun 10 17:18:43 2007 +0000 @@ -386,6 +386,7 @@ PurpleAccount *account; PurpleConnection *gc; PurpleStoredImage *img; + const char *passport; if (session->logged_in) return; @@ -409,5 +410,12 @@ * and @msn.com accounts don't automatically get the initial email * notification so we always request it on login */ - msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX"); + + passport = purple_normalize(account, purple_account_get_username(account)); + + if ((strstr(passport, "@hotmail.") != NULL) || + (strstr(passport, "@msn.com") != NULL)) + { + msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX"); + } }