mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
fixed bug causing anon FT to not resume when restarting RS when the server enforces encryption
This commit is contained in:
parent
195127f43c
commit
8189d660c4
@ -2014,7 +2014,8 @@ bool ftController::loadList(std::list<RsItem *>& load)
|
|||||||
/* This will get stored on a waiting list - until the
|
/* This will get stored on a waiting list - until the
|
||||||
* config files are fully loaded
|
* config files are fully loaded
|
||||||
*/
|
*/
|
||||||
|
#ifdef TO_REMOVE
|
||||||
|
(csoler) I removed this because RS_FILE_HINTS_NETWORK_WIDE is actually equal to RS_FILE_REQ_ENCRYPTED, so this test removed the encrypted flag when loading!!
|
||||||
// Compatibility with previous versions.
|
// Compatibility with previous versions.
|
||||||
if(rsft->flags & RS_FILE_HINTS_NETWORK_WIDE.toUInt32())
|
if(rsft->flags & RS_FILE_HINTS_NETWORK_WIDE.toUInt32())
|
||||||
{
|
{
|
||||||
@ -2022,6 +2023,7 @@ bool ftController::loadList(std::list<RsItem *>& load)
|
|||||||
rsft->flags &= ~RS_FILE_HINTS_NETWORK_WIDE.toUInt32() ;
|
rsft->flags &= ~RS_FILE_HINTS_NETWORK_WIDE.toUInt32() ;
|
||||||
rsft->flags |= RS_FILE_REQ_ANONYMOUS_ROUTING.toUInt32() ;
|
rsft->flags |= RS_FILE_REQ_ANONYMOUS_ROUTING.toUInt32() ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONTROL_DEBUG
|
#ifdef CONTROL_DEBUG
|
||||||
std::cerr << "ftController::loadList(): requesting " << rsft->file.name << ", " << rsft->file.hash << ", " << rsft->file.filesize << std::endl ;
|
std::cerr << "ftController::loadList(): requesting " << rsft->file.name << ", " << rsft->file.hash << ", " << rsft->file.filesize << std::endl ;
|
||||||
|
@ -1228,7 +1228,7 @@ bool ftServer::encryptItem(RsTurtleGenericTunnelItem *clear_item,const RsFileHas
|
|||||||
uint32_t total_data_size = ENCRYPTED_FT_HEADER_SIZE + ENCRYPTED_FT_INITIALIZATION_VECTOR_SIZE + ENCRYPTED_FT_EDATA_SIZE + item_serialized_size + ENCRYPTED_FT_AUTHENTICATION_TAG_SIZE ;
|
uint32_t total_data_size = ENCRYPTED_FT_HEADER_SIZE + ENCRYPTED_FT_INITIALIZATION_VECTOR_SIZE + ENCRYPTED_FT_EDATA_SIZE + item_serialized_size + ENCRYPTED_FT_AUTHENTICATION_TAG_SIZE ;
|
||||||
|
|
||||||
#ifdef SERVER_DEBUG
|
#ifdef SERVER_DEBUG
|
||||||
FTSERVER_DEBUG() << " clear part size : " << clear_item->serial_size() << std::endl;
|
FTSERVER_DEBUG() << " clear part size : " << size(clear_item) << std::endl;
|
||||||
FTSERVER_DEBUG() << " total item size : " << total_data_size << std::endl;
|
FTSERVER_DEBUG() << " total item size : " << total_data_size << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user