fixed bug causing re-hashing of all files in some situations, and possibly preventing file lists to transfer between friends.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8105 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-04-01 19:54:16 +00:00
parent 69c44ef9ef
commit a32acc67bb

View File

@ -56,7 +56,7 @@
// ***********/
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, const RsPeerId& pid,const std::string& config_dir)
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fiMutex("FileIndexMonitor"), fi(pid),
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, true, cs, cachedir), fiMutex("FileIndexMonitor"), fi(pid),
pendingDirs(false), pendingForceCacheWrite(false),
mForceCheck(false), mInCheck(false), hashCache(config_dir+"/" + "file_cache"),useHashCache(true)
@ -1263,7 +1263,7 @@ time_t FileIndexMonitor::locked_saveFileIndexes(bool update_cache)
for(std::set<RsPeerId>::const_iterator ff(it->second.begin());ff!=it->second.end();++ff)
_cache_items_per_peer[*ff] = data ;
data.cid.subid = 0;
data.cid.subid = n;
if(update_cache)
updateCache(data,it->second);