mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
Merge branch 'master' into less_warning
This commit is contained in:
commit
8de054812b
9 changed files with 68 additions and 21 deletions
|
@ -326,7 +326,14 @@ cleanup = true;
|
|||
|
||||
rskv->tlvkvs.pairs.push_back(kv);
|
||||
}
|
||||
{
|
||||
RsTlvKeyValue kv;
|
||||
|
||||
kv.key = WATCH_HASH_SALT_SS;
|
||||
kv.value = mLocalDirWatcher->hashSalt().toStdString();
|
||||
|
||||
rskv->tlvkvs.pairs.push_back(kv);
|
||||
}
|
||||
/* Add KeyValue to saveList */
|
||||
sList.push_back(rskv);
|
||||
|
||||
|
@ -373,6 +380,11 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
|||
{
|
||||
setWatchEnabled(kit->value == "YES") ;
|
||||
}
|
||||
else if(kit->key == WATCH_HASH_SALT_SS)
|
||||
{
|
||||
std::cerr << "Initing directory watcher with saved secret salt..." << std::endl;
|
||||
mLocalDirWatcher->setHashSalt(RsFileHash(kit->value)) ;
|
||||
}
|
||||
delete *it ;
|
||||
continue ;
|
||||
}
|
||||
|
@ -398,6 +410,14 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
|||
|
||||
delete *it ;
|
||||
}
|
||||
if(mLocalDirWatcher->hashSalt().isNull())
|
||||
{
|
||||
std::cerr << "(WW) Initialising directory watcher salt to some random value " << std::endl;
|
||||
mLocalDirWatcher->setHashSalt(RsFileHash::random()) ;
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
|
||||
|
||||
/* set directories */
|
||||
mLocalSharedDirs->setSharedDirectoryList(dirList);
|
||||
|
@ -635,7 +655,6 @@ bool p3FileDatabase::findChildPointer( void *ref, int row, void *& result,
|
|||
if(row != 0) return false;
|
||||
|
||||
convertEntryIndexToPointer(0,0,result);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if((uint32_t)row < mRemoteDirectories.size())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue