Removed an invalid comment
[modest] / src / modest-mail-operation.c
index e84c8d9..f79d8c8 100644 (file)
@@ -601,11 +601,6 @@ modest_mail_operation_clone_state (ModestMailOperation *self)
        ModestMailOperationState *state;
        ModestMailOperationPrivate *priv;
 
-       /* FIXME: this should be fixed properly
-        * 
-        * in some cases, priv was NULL, so checking here to
-        * make sure.
-        */
        g_return_val_if_fail (self, NULL);
        priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
        g_return_val_if_fail (priv, NULL);
@@ -1289,10 +1284,17 @@ static void
 update_account_send_mail (UpdateAccountInfo *info)
 {
        TnyTransportAccount *transport_account = NULL;
+       ModestTnyAccountStore *account_store;
+
+       account_store = modest_runtime_get_account_store ();
+
+       /* We don't try to send messages while sending mails is blocked */
+       if (modest_tny_account_store_is_send_mail_blocked (account_store))
+               return;
 
        /* Get the transport account */
        transport_account = (TnyTransportAccount *)
-               modest_tny_account_store_get_transport_account_for_open_connection (modest_runtime_get_account_store(),
+               modest_tny_account_store_get_transport_account_for_open_connection (account_store,
                                                                                    info->account_name);
 
        if (transport_account) {
@@ -1650,7 +1652,7 @@ recurse_folders_async_cb (TnyFolderStore *folder_store,
                                /* Add pending call */
                                info->pending_calls++;
                                
-                               tny_folder_store_get_folders_async (folder, folders, NULL,
+                               tny_folder_store_get_folders_async (folder, folders, NULL, FALSE,
                                                                    recurse_folders_async_cb, 
                                                                    NULL, info);
                                g_object_unref (folders);
@@ -1801,7 +1803,7 @@ modest_mail_operation_update_account (ModestMailOperation *self,
        /* Get all folders and continue in the callback */ 
        folders = tny_simple_list_new ();
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (priv->account),
-                                           folders, NULL,
+                                           folders, NULL, FALSE,
                                            recurse_folders_async_cb, 
                                            NULL, info);
        g_object_unref (folders);