2005-09-14 [paul] 1.9.14cvs26
[claws.git] / src / addrcache.c
index 9efede68168503b3812f0470d2ffcb19ae318280..45d709b03ee9290b3be60700ff28db824df6e416 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "mgutils.h"
 #include "addrcache.h"
+#include "utils.h"
 
 #define ID_TIME_OFFSET             998000000
 #define ADDRCACHE_MAX_SEARCH_COUNT 1000
@@ -183,9 +184,7 @@ static gint addrcache_free_item_vis( gpointer key, gpointer value, gpointer data
 */
 static void addrcache_free_item_hash( GHashTable *table ) {
        g_return_if_fail( table != NULL );
-       g_hash_table_freeze( table );
        g_hash_table_foreach_remove( table, addrcache_free_item_vis, NULL );
-       g_hash_table_thaw( table );
 }
 
 /*
@@ -270,7 +269,7 @@ gboolean addrcache_check_file( AddressCache *cache, gchar *path ) {
        struct stat filestat;
        retVal = TRUE;
        if( path ) {
-               if( 0 == stat( path, &filestat ) ) {
+               if( 0 == g_stat( path, &filestat ) ) {
                        if( filestat.st_mtime == cache->modifyTime ) retVal = FALSE;
                }
        }
@@ -285,7 +284,7 @@ gboolean addrcache_mark_file( AddressCache *cache, gchar *path ) {
        gboolean retVal = FALSE;
        struct stat filestat;
        if( path ) {
-               if( 0 == stat( path, &filestat ) ) {
+               if( 0 == g_stat( path, &filestat ) ) {
                        cache->modifyTime = filestat.st_mtime;
                        retVal = TRUE;
                }
@@ -343,7 +342,7 @@ void addrcache_print( AddressCache *cache, FILE *stream ) {
        fprintf( stream, "cache id : %s\n",  cache->cacheID );
        fprintf( stream, "next id  : %d\n",  cache->nextID );
        fprintf( stream, "name     : %s\n",  cache->name );
-       fprintf( stream, "mod time : %ld\n", cache->modifyTime );
+       fprintf( stream, "mod time : %ld\n", (long int)cache->modifyTime );
        fprintf( stream, "modified : %s\n",  cache->modified ? "yes" : "no" );
        fprintf( stream, "data read: %s\n",  cache->dataRead ? "yes" : "no" );
 }