mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-27 02:11:27 -05:00
ftFileStatus contruct failure
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@726 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3af7d41d7f
commit
e8d21abdd5
@ -39,6 +39,8 @@
|
|||||||
/***********
|
/***********
|
||||||
* #define FIM_DEBUG 1
|
* #define FIM_DEBUG 1
|
||||||
***********/
|
***********/
|
||||||
|
|
||||||
|
#define FIM_DEBUG 1
|
||||||
|
|
||||||
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
|
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
|
||||||
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fi(pid),
|
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fi(pid),
|
||||||
@ -185,6 +187,8 @@ void FileIndexMonitor::setPeriod(int period)
|
|||||||
|
|
||||||
void FileIndexMonitor::run()
|
void FileIndexMonitor::run()
|
||||||
{
|
{
|
||||||
|
std::cerr << "FileIndexMonitor::run() ";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
|
||||||
updateCycle();
|
updateCycle();
|
||||||
|
|
||||||
@ -217,6 +221,8 @@ void FileIndexMonitor::run()
|
|||||||
|
|
||||||
void FileIndexMonitor::updateCycle()
|
void FileIndexMonitor::updateCycle()
|
||||||
{
|
{
|
||||||
|
std::cerr << "FileIndexMonitor::updateCycle() ";
|
||||||
|
std::cerr << std::endl;
|
||||||
time_t startstamp = time(NULL);
|
time_t startstamp = time(NULL);
|
||||||
|
|
||||||
/* iterate through all out-of-date directories */
|
/* iterate through all out-of-date directories */
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
/****
|
/****
|
||||||
* #define FI_DEBUG 1
|
* #define FI_DEBUG 1
|
||||||
****/
|
****/
|
||||||
|
|
||||||
|
#define FI_DEBUG 1
|
||||||
|
|
||||||
|
|
||||||
DirEntry::~DirEntry()
|
DirEntry::~DirEntry()
|
||||||
|
@ -43,6 +43,9 @@ FileIndexStore::~FileIndexStore()
|
|||||||
* #define FIS_DEBUG2 1
|
* #define FIS_DEBUG2 1
|
||||||
* #define FIS_DEBUG 1
|
* #define FIS_DEBUG 1
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#define FIS_DEBUG2 1
|
||||||
|
#define FIS_DEBUG 1
|
||||||
|
|
||||||
/* actual load, once data available */
|
/* actual load, once data available */
|
||||||
int FileIndexStore::loadCache(const CacheData &data)
|
int FileIndexStore::loadCache(const CacheData &data)
|
||||||
|
@ -167,7 +167,7 @@ int main(int argc, char **argv)
|
|||||||
std::cerr << "Point 5" << std::endl;
|
std::cerr << "Point 5" << std::endl;
|
||||||
|
|
||||||
std::ostringstream pname;
|
std::ostringstream pname;
|
||||||
pname << "./tmp/rstst-" << time(NULL);
|
pname << "/tmp/rstst-" << time(NULL);
|
||||||
|
|
||||||
std::string basepath = pname.str();
|
std::string basepath = pname.str();
|
||||||
RsDirUtil::checkCreateDirectory(basepath);
|
RsDirUtil::checkCreateDirectory(basepath);
|
||||||
@ -222,6 +222,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
server->setConfigDirectory(configpath);
|
server->setConfigDirectory(configpath);
|
||||||
|
|
||||||
|
sleep(60);
|
||||||
|
|
||||||
NotifyBase *base = NULL;
|
NotifyBase *base = NULL;
|
||||||
server->SetupFtServer(base);
|
server->SetupFtServer(base);
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define FT_DEBUG 1
|
||||||
|
|
||||||
#include "fttransfermodule.h"
|
#include "fttransfermodule.h"
|
||||||
|
|
||||||
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
|
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
|
||||||
@ -45,13 +47,27 @@ bool ftTransferModule::setFileSources(std::list<std::string> peerIds)
|
|||||||
{
|
{
|
||||||
mFileSources.clear();
|
mFileSources.clear();
|
||||||
|
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "ftTransferModule::setFileSources()";
|
||||||
|
std::cerr << " List of peers: " ;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::list<std::string>::iterator it;
|
std::list<std::string>::iterator it;
|
||||||
for(it = peerIds.begin(); it != peerIds.end(); it++)
|
for(it = peerIds.begin(); it != peerIds.end(); it++)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << " \t" << *it;
|
||||||
|
#endif
|
||||||
|
|
||||||
peerInfo pInfo(*it);
|
peerInfo pInfo(*it);
|
||||||
mFileSources.insert(std::pair<std::string,peerInfo>(*it,pInfo));
|
mFileSources.insert(std::pair<std::string,peerInfo>(*it,pInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,6 +358,12 @@ bool ftTransferModule::completeFileTransfer()
|
|||||||
|
|
||||||
int ftTransferModule::tick()
|
int ftTransferModule::tick()
|
||||||
{
|
{
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "ftTransferModule::tick()";
|
||||||
|
std::cerr << " mFlag: " << mFlag;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
queryInactive();
|
queryInactive();
|
||||||
switch (mFlag)
|
switch (mFlag)
|
||||||
{
|
{
|
||||||
|
@ -116,11 +116,9 @@ public:
|
|||||||
PQIFILE_FAIL_BAD_PATH
|
PQIFILE_FAIL_BAD_PATH
|
||||||
};
|
};
|
||||||
|
|
||||||
ftFileStatus():hash(0),stat(PQIFILE_INIT) {}
|
ftFileStatus():hash(""),stat(PQIFILE_INIT) {}
|
||||||
ftFileStatus(std::string hash_in):hash(hash_in),stat(PQIFILE_INIT)
|
ftFileStatus(std::string hash_in):hash(hash_in),stat(PQIFILE_INIT) {}
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
std::string hash;
|
std::string hash;
|
||||||
Status stat;
|
Status stat;
|
||||||
};
|
};
|
||||||
|
@ -58,6 +58,8 @@ const int fldxsrvrzone = 47659;
|
|||||||
#define SERVER_DEBUG 1
|
#define SERVER_DEBUG 1
|
||||||
#define DEBUG_TICK 1
|
#define DEBUG_TICK 1
|
||||||
****/
|
****/
|
||||||
|
#define SERVER_DEBUG 1
|
||||||
|
#define DEBUG_TICK 1
|
||||||
|
|
||||||
filedexserver::filedexserver()
|
filedexserver::filedexserver()
|
||||||
:p3Config(CONFIG_TYPE_FSERVER),
|
:p3Config(CONFIG_TYPE_FSERVER),
|
||||||
@ -283,9 +285,15 @@ void filedexserver::setFileCallback(std::string ownId, CacheStrapper *strappe
|
|||||||
|
|
||||||
void filedexserver::StartupMonitor()
|
void filedexserver::StartupMonitor()
|
||||||
{
|
{
|
||||||
|
std::cerr << "filedexserver::StartupMonitor() err" << std::endl;
|
||||||
|
|
||||||
|
pqioutput(PQL_DEBUG_BASIC, fldxsrvrzone,
|
||||||
|
"filedexserver::StartupMonitor()");
|
||||||
|
|
||||||
/* startup the FileMonitor (after cache load) */
|
/* startup the FileMonitor (after cache load) */
|
||||||
fimon->setPeriod(600); /* 10 minutes */
|
fimon->setPeriod(100); /* 10 minutes */
|
||||||
/* start it up */
|
/* start it up */
|
||||||
|
|
||||||
fimon->setSharedDirectories(dbase_dirs);
|
fimon->setSharedDirectories(dbase_dirs);
|
||||||
fimon->start();
|
fimon->start();
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
* #define FT_DEBUG 1
|
* #define FT_DEBUG 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
#define FT_DEBUG 1
|
||||||
|
|
||||||
bool ftManager::lookupLocalHash(std::string hash, std::string &path, uint64_t &size)
|
bool ftManager::lookupLocalHash(std::string hash, std::string &path, uint64_t &size)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,8 @@ const int ftfilerzone = 86539;
|
|||||||
* #define FT_DEBUG 1
|
* #define FT_DEBUG 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
#define FT_DEBUG 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PQI Filer
|
* PQI Filer
|
||||||
*
|
*
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <gui/MainWindow.h>
|
#include <gui/MainWindow.h>
|
||||||
#include <gui/StartDialog.h>
|
#include <gui/StartDialog.h>
|
||||||
#include <gui/GenCertDialog.h>
|
#include <gui/GenCertDialog.h>
|
||||||
#include <Gui/Preferences/Rsharesettings.h>
|
//#include <Gui/Preferences/Rsharesettings.h>
|
||||||
|
|
||||||
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.
|
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.
|
||||||
#include <gui/qskinobject/qskinobject.h>
|
#include <gui/qskinobject/qskinobject.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user