moved removal of sources off turtle mutex to avoid cross-lock. Added a closeFile() call when moving files out of the queue

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2523 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-03-12 19:39:23 +00:00
parent 596940400d
commit c22799b996
3 changed files with 38 additions and 7 deletions

View file

@ -311,8 +311,11 @@ class p3turtle: public p3Service, public pqiMonitor, public RsTurtle,/* public f
/// Handle tunnel digging for current file hashes
void manageTunnels() ;
/// closes a given tunnel. Should be called with mutex set.
void locked_closeTunnel(TurtleTunnelId tid) ;
/// Closes a given tunnel. Should be called with mutex set.
/// The hashes and peers to remove (by calling
/// ftController::removeFileSource() are happended to the supplied vector
/// so that they can be removed off the turtle mutex.
void locked_closeTunnel(TurtleTunnelId tid,std::vector<std::pair<TurtleFileHash,TurtleVirtualPeerId> >& peers_to_remove) ;
/// Main routing function
int handleIncoming();