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:
ewensun 2008-09-10 14:12:13 +00:00
parent 3af7d41d7f
commit e8d21abdd5
10 changed files with 53 additions and 9 deletions

View File

@ -39,6 +39,8 @@
/***********
* #define FIM_DEBUG 1
***********/
#define FIM_DEBUG 1
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fi(pid),
@ -185,6 +187,8 @@ void FileIndexMonitor::setPeriod(int period)
void FileIndexMonitor::run()
{
std::cerr << "FileIndexMonitor::run() ";
std::cerr << std::endl;
updateCycle();
@ -217,6 +221,8 @@ void FileIndexMonitor::run()
void FileIndexMonitor::updateCycle()
{
std::cerr << "FileIndexMonitor::updateCycle() ";
std::cerr << std::endl;
time_t startstamp = time(NULL);
/* iterate through all out-of-date directories */

View File

@ -36,6 +36,8 @@
/****
* #define FI_DEBUG 1
****/
#define FI_DEBUG 1
DirEntry::~DirEntry()

View File

@ -43,6 +43,9 @@ FileIndexStore::~FileIndexStore()
* #define FIS_DEBUG2 1
* #define FIS_DEBUG 1
**/
#define FIS_DEBUG2 1
#define FIS_DEBUG 1
/* actual load, once data available */
int FileIndexStore::loadCache(const CacheData &data)

View File

@ -167,7 +167,7 @@ int main(int argc, char **argv)
std::cerr << "Point 5" << std::endl;
std::ostringstream pname;
pname << "./tmp/rstst-" << time(NULL);
pname << "/tmp/rstst-" << time(NULL);
std::string basepath = pname.str();
RsDirUtil::checkCreateDirectory(basepath);
@ -222,6 +222,8 @@ int main(int argc, char **argv)
server->setConfigDirectory(configpath);
sleep(60);
NotifyBase *base = NULL;
server->SetupFtServer(base);

View File

@ -23,6 +23,8 @@
*
*/
#define FT_DEBUG 1
#include "fttransfermodule.h"
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
@ -45,13 +47,27 @@ bool ftTransferModule::setFileSources(std::list<std::string> peerIds)
{
mFileSources.clear();
#ifdef FT_DEBUG
std::cerr << "ftTransferModule::setFileSources()";
std::cerr << " List of peers: " ;
#endif
std::list<std::string>::iterator it;
for(it = peerIds.begin(); it != peerIds.end(); it++)
{
#ifdef FT_DEBUG
std::cerr << " \t" << *it;
#endif
peerInfo pInfo(*it);
mFileSources.insert(std::pair<std::string,peerInfo>(*it,pInfo));
}
#ifdef FT_DEBUG
std::cerr << std::endl;
#endif
return true;
}
@ -342,6 +358,12 @@ bool ftTransferModule::completeFileTransfer()
int ftTransferModule::tick()
{
#ifdef FT_DEBUG
std::cerr << "ftTransferModule::tick()";
std::cerr << " mFlag: " << mFlag;
std::cerr << std::endl;
#endif
queryInactive();
switch (mFlag)
{

View File

@ -116,11 +116,9 @@ public:
PQIFILE_FAIL_BAD_PATH
};
ftFileStatus():hash(0),stat(PQIFILE_INIT) {}
ftFileStatus(std::string hash_in):hash(hash_in),stat(PQIFILE_INIT)
{
return;
}
ftFileStatus():hash(""),stat(PQIFILE_INIT) {}
ftFileStatus(std::string hash_in):hash(hash_in),stat(PQIFILE_INIT) {}
std::string hash;
Status stat;
};

View File

@ -58,6 +58,8 @@ const int fldxsrvrzone = 47659;
#define SERVER_DEBUG 1
#define DEBUG_TICK 1
****/
#define SERVER_DEBUG 1
#define DEBUG_TICK 1
filedexserver::filedexserver()
:p3Config(CONFIG_TYPE_FSERVER),
@ -283,9 +285,15 @@ void filedexserver::setFileCallback(std::string ownId, CacheStrapper *strappe
void filedexserver::StartupMonitor()
{
std::cerr << "filedexserver::StartupMonitor() err" << std::endl;
pqioutput(PQL_DEBUG_BASIC, fldxsrvrzone,
"filedexserver::StartupMonitor()");
/* startup the FileMonitor (after cache load) */
fimon->setPeriod(600); /* 10 minutes */
/* start it up */
fimon->setPeriod(100); /* 10 minutes */
/* start it up */
fimon->setSharedDirectories(dbase_dirs);
fimon->start();

View File

@ -30,6 +30,7 @@
* #define FT_DEBUG 1
***/
#define FT_DEBUG 1
bool ftManager::lookupLocalHash(std::string hash, std::string &path, uint64_t &size)
{

View File

@ -41,6 +41,8 @@ const int ftfilerzone = 86539;
* #define FT_DEBUG 1
***/
#define FT_DEBUG 1
/*
* PQI Filer
*

View File

@ -25,7 +25,7 @@
#include <gui/MainWindow.h>
#include <gui/StartDialog.h>
#include <gui/GenCertDialog.h>
#include <Gui/Preferences/Rsharesettings.h>
//#include <Gui/Preferences/Rsharesettings.h>
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.
#include <gui/qskinobject/qskinobject.h>