X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation.c;h=f1ecaa5d6eb0becbfb050f9f8c48021505d6baca;hp=7c522bc9a111a50005bfe24bcfa7eafb343f8839;hb=8ed05d001f888c47a70ba2500febf7b61eae162f;hpb=10135c887c0c30ddefa85716b06d3e5795a17651 diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 7c522bc..f1ecaa5 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2183,10 +2183,10 @@ get_msg_async_cb (TnyFolder *folder, } /* If canceled by the user, ignore the error given by Tinymail */ - if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) { + if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED || canceled) { canceled = TRUE; finished = TRUE; - } else if (canceled || err) { + } else if (err) { priv->status = MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS; if (err) { priv->error = g_error_copy ((const GError *) err); @@ -2271,6 +2271,7 @@ modest_mail_operation_get_msgs_full (ModestMailOperation *self, has_uncached_messages = TRUE; g_object_unref (header); } + g_object_unref (iter); priv->op_type = has_uncached_messages?MODEST_MAIL_OPERATION_TYPE_RECEIVE:MODEST_MAIL_OPERATION_TYPE_OPEN; /* Get account and set it into mail_operation */