# HG changeset patch # User Elliott Sales de Andrade # Date 1217221848 0 # Node ID b2609fca4943d19756cd5c69fbaa724dc0d1c78e # Parent 8218a2c209f1203339361df8c766eb3073604746 Use "EmailEnabled" from the MSN profile message to determine whether the email inbox can be opened. References #5762. diff -r 8218a2c209f1 -r b2609fca4943 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Mon Jul 28 01:51:11 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Mon Jul 28 05:10:48 2008 +0000 @@ -428,6 +428,12 @@ gc = (PurpleConnection *) action->context; session = gc->proto_data; + if (!session->passport_info.email_enabled) { + purple_notify_error(gc, NULL, + _("This account does not have email enabled."), NULL); + return; + } + /** apparently the correct value is 777, use 750 as a failsafe */ if (time (NULL) - session->passport_info.mail_timestamp >= 750) { MsnTransaction *trans; @@ -436,16 +442,12 @@ cmdproc = session->notification->cmdproc; trans = msn_transaction_new(cmdproc, "URL", "%s", "INBOX"); - msn_transaction_set_data(trans, GUINT_TO_POINTER (TRUE)); + msn_transaction_set_data(trans, GUINT_TO_POINTER(TRUE)); msn_cmdproc_send_trans(cmdproc, trans); } else if (session->passport_info.file != NULL) { purple_notify_uri(gc, session->passport_info.file); - - } else { - purple_notify_error(gc, NULL, - _("This Hotmail account may not be active."), NULL); } } diff -r 8218a2c209f1 -r b2609fca4943 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Mon Jul 28 01:51:11 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Mon Jul 28 05:10:48 2008 +0000 @@ -1666,6 +1666,9 @@ if ((value = msn_message_get_attr(msg, "LoginTime")) != NULL) session->passport_info.sl = atol(value); + if ((value = msn_message_get_attr(msg, "EmailEnabled")) != NULL) + session->passport_info.email_enabled = (gboolean)atol(value); + /*starting retrieve the contact list*/ clLastChange = purple_account_get_string(session->account, "CLLastChange", NULL); #ifdef MSN_PARTIAL_LISTS diff -r 8218a2c209f1 -r b2609fca4943 libpurple/protocols/msn/session.h --- a/libpurple/protocols/msn/session.h Mon Jul 28 01:51:11 2008 +0000 +++ b/libpurple/protocols/msn/session.h Mon Jul 28 05:10:48 2008 +0000 @@ -119,6 +119,7 @@ char *client_ip; int client_port; gulong mail_timestamp; + gboolean email_enabled; } passport_info; GHashTable *soap_table;