Skips the hierarchies creation if it is done. ** Fixes #312229.
authorArunprakash <arunp@novell.com>
Fri, 30 Sep 2005 05:16:29 +0000 (05:16 +0000)
committerArunprakash S <arunp@src.gnome.org>
Fri, 30 Sep 2005 05:16:29 +0000 (05:16 +0000)
2005-09-30  Arunprakash  <arunp@novell.com>

        * storage/exchange-account.c (setup_account_hierarchies) : Skips the
        hierarchies creation if it is done.
        ** Fixes #312229.

servers/exchange/ChangeLog
servers/exchange/storage/exchange-account.c

index abcc295..9a9087e 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-30  Arunprakash  <arunp@novell.com>
+
+       * storage/exchange-account.c (setup_account_hierarchies) : Skips the
+       hierarchies creation if it is done.
+       ** Fixes #312229.
+
 2005-08-26  Sarfraaz Ahmed <asarfraaz@novell.com>
 
        * lib/e2k-autoconfig.c (e2k_validate_user) : Fix the password key to
index d750826..c6c214a 100644 (file)
@@ -1263,6 +1263,10 @@ setup_account_hierarchies (ExchangeAccount *account)
        if (offline == UNSUPPORTED_MODE)
                return FALSE;
 
+       /* Check if folder hierarchies are already setup. */
+       if (account->priv->hierarchies->len > 0)
+               goto hierarchies_created;
+
        /* Set up Personal Folders hierarchy */
        phys_uri_prefix = g_strdup_printf ("exchange://%s/;personal",
                                           account->priv->uri_authority);
@@ -1277,7 +1281,6 @@ setup_account_hierarchies (ExchangeAccount *account)
                                              TRUE);
        setup_hierarchy (account, hier);
        g_free (phys_uri_prefix);
-       personal_hier = hier;
 
        /* Favorite Public Folders */
        phys_uri_prefix = g_strdup_printf ("exchange://%s/;favorites",
@@ -1337,10 +1340,16 @@ setup_account_hierarchies (ExchangeAccount *account)
                closedir (d);
        }
 
+hierarchies_created:
+       
        /* Scan the personal and favorite folders so we can resolve references
         * to the Calendar, Contacts, etc even if the tree isn't
         * opened.
         */
+
+       /* Assuming the first element being personal hierarchy. */
+       personal_hier = account->priv->hierarchies->pdata[0];
+       
        fresult = exchange_hierarchy_scan_subtree (personal_hier,
                                                   personal_hier->toplevel,
                                                   (offline == OFFLINE_MODE));