the variable which holds the UTC time is not static anymore.
authorParthasarathi Susarla <sparthasarathi@novell.com>
Thu, 17 Feb 2005 08:54:28 +0000 (08:54 +0000)
committerParthasarathi Susarla <saps@src.gnome.org>
Thu, 17 Feb 2005 08:54:28 +0000 (08:54 +0000)
2005-02-17  Parthasarathi Susarla <sparthasarathi@novell.com>

* camel-groupwise-store.c: (groupwise_get_folder):
* camel-groupwise-folder.c: (groupwise_refresh_info):
  the variable which holds the UTC time is not static
  anymore.

camel/providers/groupwise/ChangeLog
camel/providers/groupwise/camel-groupwise-folder.c
camel/providers/groupwise/camel-groupwise-store.c

index 66b0001..9e338cf 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-17  Parthasarathi Susarla <sparthasarathi@novell.com>
+       
+       * camel-groupwise-store.c: (groupwise_get_folder):
+       * camel-groupwise-folder.c: (groupwise_refresh_info):
+         the variable which holds the UTC time is not static
+         anymore. 
+         
 2005-02-10  Parthasarathi Susarla <sparthasarathi@novell.com>
        
        * camel-groupwise-store.c:
index 170f940..f2d95a0 100644 (file)
@@ -606,7 +606,7 @@ groupwise_refresh_info(CamelFolder *folder, CamelException *ex)
        GSList *slist = NULL, *sl ;
        char *container_id = NULL ;
        char *cache_file_name ;
-       time_t mod_time = 0 ;
+       time_t mod_time = time (0) ;
        char time_string[100] = {0} ;
        const struct tm *tm ;
        struct stat buf ;
@@ -626,12 +626,10 @@ groupwise_refresh_info(CamelFolder *folder, CamelException *ex)
                gw_folder->need_refresh = TRUE ;
        }
 
-       if (!mod_time) {
-               cache_file_name = g_strdup (folder->summary->summary_path) ;
-               stat (cache_file_name, &buf) ;
-               mod_time = buf.st_mtime ;
-               g_free (cache_file_name) ;
-       }
+       cache_file_name = g_strdup (folder->summary->summary_path) ;
+       stat (cache_file_name, &buf) ;
+       mod_time = buf.st_mtime ;
+       g_free (cache_file_name) ;
 
        tm = gmtime (&mod_time) ;
        strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm) ;
@@ -739,9 +737,9 @@ gw_update_summary ( CamelFolder *folder, GList *item_list,CamelException *ex)
 
                        status_flags = 0;
                        item_status = e_gw_item_get_item_status (item);
-                       /*if (item_status & E_GW_ITEM_STAT_READ)
+                       if (item_status & E_GW_ITEM_STAT_READ)
                                status_flags |= CAMEL_MESSAGE_SEEN;
-                       if (item_status & E_GW_ITEM_STAT_DELETED)
+                       /*if (item_status & E_GW_ITEM_STAT_DELETED)
                                status_flags |= CAMEL_MESSAGE_DELETED;*/
                        if (item_status & E_GW_ITEM_STAT_REPLIED)
                                status_flags |= CAMEL_MESSAGE_ANSWERED;
index 0ec3f70..ce2adad 100644 (file)
@@ -534,17 +534,17 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
        summary_count = camel_folder_summary_count (folder->summary) ;
        if(summary_count) {
                char *cache_file_name ;
-               time_t mod_time = 0 ;
+               time_t mod_time = time (0) ;
                char time_string[100] = {0} ;
                const struct tm *tm ;
                struct stat buf;
                
                
-               if (!mod_time) {
-                       cache_file_name = g_strdup (folder->summary->summary_path) ;
-                       printf ("%s %d\n", cache_file_name, stat (cache_file_name, &buf));
-                       mod_time = buf.st_mtime;
-               }
+               
+               cache_file_name = g_strdup (folder->summary->summary_path) ;
+               stat (cache_file_name, &buf) ;
+               g_free (cache_file_name) ;
+               mod_time = buf.st_mtime;
                tm = gmtime (&mod_time);
                strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
                camel_operation_start (NULL, _("Fetching summary information for new messages"));
@@ -556,7 +556,6 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
                        //camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
                        CAMEL_SERVICE_UNLOCK (gw_store, connect_lock) ;
                        camel_operation_end (NULL);
-                       g_free (cache_file_name) ;
                        g_free (container_id) ;
                        gw_store->current_folder = folder ;
                        camel_object_ref (folder) ;
@@ -579,7 +578,6 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
                        //camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
                        CAMEL_SERVICE_UNLOCK (gw_store, connect_lock) ;
                        camel_operation_end (NULL);
-                       g_free (cache_file_name) ;
                        g_free (container_id) ;
                        gw_store->current_folder = folder ;
                        camel_object_ref (folder) ;