mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
- removed LinksCloud from plugins (based on obsolete cache system)
- removed copy constructor of RsGenericId from std::string as it allowed many inconsistencies and double transforms of IDs from/to strings git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
160e04fe9a
commit
33abca82e5
33 changed files with 97 additions and 143 deletions
|
@ -882,7 +882,7 @@ bool CacheStrapper::saveList(bool &cleanup, std::list<RsItem *>& saveData)
|
|||
// Fixup lazy behaviour in clients...
|
||||
// This ensures correct loading later.
|
||||
// (used to be: rscc->pid = cit->pid;)
|
||||
rscc->pid = ownId.toStdString();
|
||||
rscc->pid = ownId;
|
||||
|
||||
//rscc->pname = cit->pname;
|
||||
rscc->cachetypeid = cit->cid.type;
|
||||
|
@ -909,7 +909,7 @@ bool CacheStrapper::saveList(bool &cleanup, std::list<RsItem *>& saveData)
|
|||
|
||||
RsCacheConfig *rscc = new RsCacheConfig();
|
||||
|
||||
rscc->pid = cit->pid.toStdString();
|
||||
rscc->pid = cit->pid;
|
||||
//rscc->pname = cit->pname;
|
||||
rscc->cachetypeid = cit->cid.type;
|
||||
rscc->cachesubid = cit->cid.subid;
|
||||
|
|
|
@ -199,7 +199,7 @@ HashCache::HashCache(const std::string& path)
|
|||
|
||||
f->getline(buff,max_line_size,'\n') ; if(sscanf(buff,RsDirUtil::scanf_string_for_uint(sizeof(info.time_stamp)),&info.time_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; }
|
||||
f->getline(buff,max_line_size,'\n') ; if(sscanf(buff,RsDirUtil::scanf_string_for_uint(sizeof(info.modf_stamp)),&info.modf_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; }
|
||||
f->getline(buff,max_line_size,'\n') ; info.hash = std::string(buff) ;
|
||||
f->getline(buff,max_line_size,'\n') ; info.hash = RsFileHash(std::string(buff)) ;
|
||||
|
||||
#ifdef FIM_DEBUG
|
||||
std::cerr << " (" << name << ", " << info.size << ", " << info.time_stamp << ", " << info.modf_stamp << ", " << info.hash << std::endl ;
|
||||
|
|
|
@ -941,7 +941,7 @@ int FileIndex::loadIndex(const std::string& filename, const RsFileHash& expected
|
|||
nfile = new FileEntry();
|
||||
registerEntry((void*)nfile) ;
|
||||
nfile->name = tokens[0];
|
||||
nfile->hash = tokens[1];
|
||||
nfile->hash = RsFileHash(tokens[1]);
|
||||
nfile->size = atoll(tokens[2].c_str());
|
||||
nfile->modtime = atoi(tokens[3].c_str());
|
||||
nfile->pop = atoi(tokens[4].c_str());
|
||||
|
@ -1051,7 +1051,7 @@ int FileIndex::saveIndex(const std::string& filename, RsFileHash &fileHash, uint
|
|||
return false ;
|
||||
}
|
||||
|
||||
fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size).toStdString() ;
|
||||
fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size);
|
||||
|
||||
std::cerr << " file = " << filename << std::endl;
|
||||
std::cerr << " old size = " << s.length() << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue