add ifdef for debug logs

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1880 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-14 18:10:34 +00:00
parent 3cac0c1ce9
commit 35631d180e

View File

@ -373,24 +373,28 @@ bool ftController::completeFile(std::string hash)
{
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
std::cerr << "ftController:completeFile(" << hash << ")";
#ifdef CONTROL_DEBUG
std::cerr << "ftController:completeFile(" << hash << ")";
std::cerr << std::endl;
#endif
std::map<std::string, ftFileControl>::iterator it;
it = mDownloads.find(hash);
if (it == mDownloads.end())
{
std::cerr << "ftController:completeFile(" << hash << ")";
#ifdef CONTROL_DEBUG
std::cerr << "ftController:completeFile(" << hash << ")";
std::cerr << " Not Found!";
std::cerr << std::endl;
return false;
#endif
return false;
}
/* check if finished */
if (!(it->second).mCreator->finished())
{
/* not done! */
std::cerr << "ftController:completeFile(" << hash << ")";
#ifdef CONTROL_DEBUG
std::cerr << "ftController:completeFile(" << hash << ")";
std::cerr << " Transfer Not Done";
std::cerr << std::endl;
@ -398,7 +402,7 @@ bool ftController::completeFile(std::string hash)
std::cerr << (it->second).mCreator->getFileSize();
std::cerr << " and Recvd: ";
std::cerr << (it->second).mCreator->getRecvd();
#endif
return false;
}