First-time quickfix
authorPhilip Van Hoof <philip@codeminded.be>
Tue, 19 Jun 2007 11:31:46 +0000 (11:31 +0000)
committerPhilip Van Hoof <philip@codeminded.be>
Tue, 19 Jun 2007 11:31:46 +0000 (11:31 +0000)
pmo-trunk-r2308

src/modest-mail-operation.c

index 4519119..43e893a 100644 (file)
@@ -871,6 +871,7 @@ set_last_updated_idle (gpointer data)
 static gpointer
 update_account_thread (gpointer thr_user_data)
 {
+       static gboolean first_time = TRUE;
        UpdateAccountInfo *info;
        TnyList *all_folders = NULL;
        GPtrArray *new_headers;
@@ -889,7 +890,7 @@ update_account_thread (gpointer thr_user_data)
         * for POP3, we do a logout-login upon send/receive -- many POP-servers (like Gmail) do not
         * show any updates unless we do that
         */
-       if (TNY_IS_CAMEL_POP_STORE_ACCOUNT(priv->account)) 
+       if (!first_time && TNY_IS_CAMEL_POP_STORE_ACCOUNT(priv->account)) 
                tny_camel_pop_store_account_reconnect (TNY_CAMEL_POP_STORE_ACCOUNT(priv->account));
 
        /* Get all the folders. We can do it synchronously because
@@ -1085,6 +1086,8 @@ update_account_thread (gpointer thr_user_data)
        g_free (info->retrieve_type);
        g_slice_free (UpdateAccountInfo, info);
 
+       first_time = FALSE;
+
        return NULL;
 }