added/fixed some debug info

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6208 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-03-11 20:44:23 +00:00
parent 123d4a630b
commit 400f9f63d8
2 changed files with 8 additions and 2 deletions

View File

@ -811,14 +811,14 @@ bool ftDataMultiplex::handleRecvClientChunkMapRequest(const std::string& peerId,
// If we can't find the client, it's not a problem. Chunk maps from
// clients are not essential, as they are only used for display.
#ifdef MPLEX_DEBUG
std::cerr << "ftDataMultiplex::handleRecvServerChunkMapRequest() ERROR: No matching Client for hash " << hash ;
std::cerr << "ftDataMultiplex::handleRecvClientChunkMapRequest() ERROR: No matching Client for hash " << hash ;
std::cerr << ". Performing local search." << std::endl;
#endif
return false;
}
#ifdef MPLEX_DEBUG
std::cerr << "ftDataMultiplex::handleRecvServerChunkMapRequest() Sending map of file " << hash << ", to peer " << peerId << std::endl;
std::cerr << "ftDataMultiplex::handleRecvClientChunkMapRequest() Sending map of file " << hash << ", to peer " << peerId << std::endl;
#endif
(it->second).mCreator->getAvailabilityMap(cmap);
@ -989,7 +989,10 @@ bool ftDataMultiplex::handleRecvServerChunkMapRequest(const std::string& peerId,
it = mServers.find(hash) ;
if(it == mServers.end()) // handleSearchRequest should have filled mServers[hash], but we have been off-mutex since,
{
std::cerr << "ftDataMultiplex::handleRecvChunkMapReq() : weird state: search request succeeded, but no server available!" << std::endl;
return false ; // so it's safer to check again.
}
else
it->second->getAvailabilityMap(cmap);
}

View File

@ -573,6 +573,9 @@ void ftFileCreator::setSourceMap(const std::string& peer_id,const CompressedChun
{
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
#ifdef FILE_DEBUG
std::cerr << "ftFileCreator:: Received source map for hash " << hash << " for source peer " << peer_id << std::endl;
#endif
// At this point, we should cancel all file chunks that are asked to the
// peer and which this peer actually doesn't possesses. Otherwise, the transfer may get stuck.
// This should be done by: