#include "mgutils.h"
#include "addrcache.h"
+#include "utils.h"
#define ID_TIME_OFFSET 998000000
#define ADDRCACHE_MAX_SEARCH_COUNT 1000
*/
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 );
}
/*
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;
}
}
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;
}
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" );
}