* Removed annoying warning for check retrieval in message open
handler. THis was appearing everytime we cancelled a
message retrieval.
* src/modest-mail-operation.c:
* Now we notify the end of the mail operation before
unreferencing. This prevents a crash.
* Now we do a tny_account_cancel in status handler when we
get a cancel status. This way we properly cancel the
message download (and then we can try again to open the
message as expected (fixes NB#62444).
pmo-trunk-r2696
+ /* Notify about operation end */
+ modest_mail_operation_notify_end (self);
/* Free */
g_object_unref (helper->mail_op);
g_object_unref (helper->header);
g_slice_free (GetMsgAsyncHelper, helper);
/* Free */
g_object_unref (helper->mail_op);
g_object_unref (helper->header);
g_slice_free (GetMsgAsyncHelper, helper);
- /* Notify about operation end */
- modest_mail_operation_notify_end (self);
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
- if(priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED)
+ if(priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ TnyFolder *folder = tny_header_get_folder (helper->header);
+ if (folder) {
+ TnyAccount *account;
+ account = tny_folder_get_account (folder);
+ if (account) {
+ tny_account_cancel (account);
+ g_object_unref (account);
+ }
+ g_object_unref (folder);
+ }
+
priv->done = 1;
priv->total = 1;
priv->done = 1;
priv->total = 1;
info_notify, NULL);
}
g_object_unref (msg);
info_notify, NULL);
}
g_object_unref (msg);
} else {
/* Set status failed and set an error */
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
} else {
/* Set status failed and set an error */
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
operation. The error will be shown by the error_handler of
the mail operation */
if (!modest_ui_actions_msg_retrieval_check (mail_op, header, msg)) {
operation. The error will be shown by the error_handler of
the mail operation */
if (!modest_ui_actions_msg_retrieval_check (mail_op, header, msg)) {
- printf ("DEBUG: %s: modest_ui_actions_msg_retrieval_check() failed.\n",
- __FUNCTION__);