mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 13:02:27 -04:00
Merge branch 'master' into android
This commit is contained in:
commit
ea42d822c2
257 changed files with 11438 additions and 22401 deletions
|
@ -526,11 +526,10 @@ bool RsAccountsDetail::getAvailableAccounts(std::map<RsPeerId, AccountDetails> &
|
|||
|
||||
struct stat64 buf;
|
||||
|
||||
while (dirIt.readdir())
|
||||
for(;dirIt.isValid();dirIt.next())
|
||||
{
|
||||
/* check entry type */
|
||||
std::string fname;
|
||||
dirIt.d_name(fname);
|
||||
std::string fname = dirIt.file_name();
|
||||
std::string fullname = mBaseDirectory + "/" + fname;
|
||||
#ifdef FIM_DEBUG
|
||||
std::cerr << "calling stats on " << fullname <<std::endl;
|
||||
|
@ -1053,7 +1052,7 @@ bool RsAccountsDetail::GenerateSSLCertificate(const RsPgpId& pgp_id, const s
|
|||
|
||||
X509_print_ex(bio_out, x509, nmflag, reqflag);
|
||||
|
||||
BIO_flush(bio_out);
|
||||
(void) BIO_flush(bio_out);
|
||||
BIO_free(bio_out);
|
||||
|
||||
/* Save cert to file */
|
||||
|
|
|
@ -56,7 +56,8 @@
|
|||
#include <openssl/rand.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <gxstunnel/p3gxstunnel.h>
|
||||
#include "gxstunnel/p3gxstunnel.h"
|
||||
#include "file_sharing/p3filelists.h"
|
||||
|
||||
#define ENABLE_GROUTER
|
||||
|
||||
|
@ -804,7 +805,6 @@ bool RsInit::SetHiddenLocation(const std::string& hiddenaddress, uint16_t port)
|
|||
#include <unistd.h>
|
||||
//#include <getopt.h>
|
||||
|
||||
#include "dbase/cachestrapper.h"
|
||||
#include "ft/ftserver.h"
|
||||
#include "ft/ftcontroller.h"
|
||||
|
||||
|
@ -1239,12 +1239,10 @@ int RsServer::StartupRetroShare()
|
|||
//pqih = new pqipersongrpDummy(none, flags);
|
||||
|
||||
/****** New Ft Server **** !!! */
|
||||
ftServer *ftserver = new ftServer(mPeerMgr, serviceCtrl);
|
||||
ftserver->setConfigDirectory(rsAccounts->PathAccountDirectory());
|
||||
ftServer *ftserver = new ftServer(mPeerMgr, serviceCtrl);
|
||||
ftserver->setConfigDirectory(rsAccounts->PathAccountDirectory());
|
||||
|
||||
ftserver->SetupFtServer() ;
|
||||
CacheStrapper *mCacheStrapper = ftserver->getCacheStrapper();
|
||||
//CacheTransfer *mCacheTransfer = ftserver->getCacheTransfer();
|
||||
|
||||
/* setup any extra bits (Default Paths) */
|
||||
ftserver->setPartialsDirectory(emergencyPartialsDir);
|
||||
|
@ -1288,7 +1286,6 @@ int RsServer::StartupRetroShare()
|
|||
// These are needed to load plugins: plugin devs might want to know the place of
|
||||
// cache directories, get pointers to cache strapper, or access ownId()
|
||||
//
|
||||
mPluginsManager->setCacheDirectories(localcachedir,remotecachedir) ;
|
||||
mPluginsManager->setServiceControl(serviceCtrl) ;
|
||||
|
||||
// std::cerr << "rsinitconf (core 1) = " << (void*)rsInitConfig<<std::endl;
|
||||
|
@ -1499,22 +1496,25 @@ int RsServer::StartupRetroShare()
|
|||
pqih->addService(gr,true) ;
|
||||
#endif
|
||||
|
||||
p3turtle *tr = new p3turtle(serviceCtrl,mLinkMgr) ;
|
||||
p3FileDatabase *fdb = new p3FileDatabase(serviceCtrl) ;
|
||||
p3turtle *tr = new p3turtle(serviceCtrl,mLinkMgr) ;
|
||||
rsTurtle = tr ;
|
||||
pqih -> addService(tr,true);
|
||||
pqih -> addService(ftserver,true);
|
||||
pqih -> addService(fdb,true);
|
||||
pqih -> addService(ftserver,true);
|
||||
|
||||
mGxsTunnels = new p3GxsTunnelService(mGxsIdService) ;
|
||||
mGxsTunnels->connectToTurtleRouter(tr) ;
|
||||
rsGxsTunnel = mGxsTunnels;
|
||||
|
||||
|
||||
rsDisc = mDisc;
|
||||
rsMsgs = new p3Msgs(msgSrv, chatSrv);
|
||||
|
||||
// connect components to turtle router.
|
||||
|
||||
ftserver->connectToTurtleRouter(tr) ;
|
||||
chatSrv->connectToGxsTunnelService(mGxsTunnels) ;
|
||||
ftserver->connectToFileDatabase(fdb) ;
|
||||
chatSrv->connectToGxsTunnelService(mGxsTunnels) ;
|
||||
gr->connectToTurtleRouter(tr) ;
|
||||
#ifdef ENABLE_GROUTER
|
||||
msgSrv->connectToGlobalRouter(gr) ;
|
||||
|
@ -1619,10 +1619,6 @@ int RsServer::StartupRetroShare()
|
|||
mLinkMgr->addMonitor(serviceCtrl);
|
||||
mLinkMgr->addMonitor(serviceInfo);
|
||||
|
||||
// NOTE these were added in ftServer (was added twice).
|
||||
//mLinkMgr->addMonitor(mCacheStrapper);
|
||||
//mLinkMgr->addMonitor(((ftController *) mCacheTransfer));
|
||||
|
||||
// Services that have been changed to pqiServiceMonitor
|
||||
serviceCtrl->registerServiceMonitor(msgSrv, msgSrv->getServiceInfo().mServiceType);
|
||||
serviceCtrl->registerServiceMonitor(mDisc, mDisc->getServiceInfo().mServiceType);
|
||||
|
@ -1678,12 +1674,6 @@ int RsServer::StartupRetroShare()
|
|||
/**************************************************************************/
|
||||
std::cerr << "(2) Load configuration files" << std::endl;
|
||||
|
||||
/* NOTE: CacheStrapper's load causes Cache Files to be
|
||||
* loaded into all the CacheStores/Sources. This happens
|
||||
* after all the other configurations have happened.
|
||||
*/
|
||||
|
||||
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
|
||||
mConfigMgr->loadConfiguration();
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
|
@ -44,7 +44,26 @@
|
|||
*
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const DirDetails& d)
|
||||
{
|
||||
std::cerr << "====DIR DETAILS====" << std::endl;
|
||||
std::cerr << " parent pointer: " << d.parent << std::endl;
|
||||
std::cerr << " current pointer: " << d.ref << std::endl;
|
||||
std::cerr << " parent row : " << d.prow << std::endl;
|
||||
std::cerr << " type : " << (int)d.type << std::endl;
|
||||
std::cerr << " PeerId : " << d.id << std::endl;
|
||||
std::cerr << " Name : " << d.name << std::endl;
|
||||
std::cerr << " Hash : " << d.hash << std::endl;
|
||||
std::cerr << " Path : " << d.path << std::endl;
|
||||
std::cerr << " Count : " << d.count << std::endl;
|
||||
std::cerr << " Age : " << d.age << std::endl;
|
||||
std::cerr << " Min age : " << d.min_age << std::endl;
|
||||
std::cerr << " Flags : " << d.flags << std::endl;
|
||||
std::cerr << " Parent groups : " ; for(std::list<RsNodeGroupId>::const_iterator it(d.parent_groups.begin());it!=d.parent_groups.end();++it) std::cerr << (*it) << " "; std::cerr << std::endl;
|
||||
std::cerr << " Children : " ; for(uint32_t i=0;i<d.children.size();++i) std::cerr << (void*)(intptr_t)d.children[i].ref << " "; std::cerr << std::endl;
|
||||
std::cerr << "===================" << std::endl;
|
||||
return out;
|
||||
}
|
||||
std::ostream &operator<<(std::ostream &out, const FileInfo &info)
|
||||
{
|
||||
out << "FileInfo: path: " << info.path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue