* More bugfixes for file transfer.

* Added File Transfer / ExtraList to channels.
 * fixed mutex deadlock.
 * added slow transfer for background tf.
 * added checks to FileRequest to accumulate peers.
 * added ExtraList callback.
 * etc, etc.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@797 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-11-09 22:17:20 +00:00
parent 1e33267951
commit aee6cb85b4
14 changed files with 385 additions and 51 deletions

View file

@ -561,19 +561,6 @@ void p3GroupDistrib::loadMsg(RsDistribSignedMsg *newMsg, std::string src, bool l
return;
}
/* check for duplicate message */
std::map<std::string, RsDistribMsg *>::iterator mit;
if ((git->second).msgs.end() != (git->second).msgs.find(newMsg->msgId))
{
#ifdef DISTRIB_DEBUG
std::cerr << "p3GroupDistrib::loadMsg() Msg already exists" << std::endl;
std::cerr << std::endl;
#endif
/* if already there -> remove */
delete newMsg;
return;
}
/****************** check the msg ******************/
if (!locked_validateDistribSignedMsg(git->second, newMsg))
{
@ -585,6 +572,26 @@ void p3GroupDistrib::loadMsg(RsDistribSignedMsg *newMsg, std::string src, bool l
return;
}
/* check for duplicate message
*
* do this after validate - because we are calling
* duplicateMsg... only want to do if is good.
*/
std::map<std::string, RsDistribMsg *>::iterator mit;
mit = (git->second).msgs.find(newMsg->msgId);
if (mit != (git->second).msgs.end())
{
#ifdef DISTRIB_DEBUG
std::cerr << "p3GroupDistrib::loadMsg() Msg already exists" << std::endl;
std::cerr << std::endl;
#endif
/* if already there -> remove */
locked_eventDuplicateMsg(&(git->second), mit->second, src);
delete newMsg;
return;
}
/* convert Msg */
RsDistribMsg *msg = unpackDistribSignedMsg(newMsg);
if (!msg)
@ -617,7 +624,7 @@ void p3GroupDistrib::loadMsg(RsDistribSignedMsg *newMsg, std::string src, bool l
#endif
/* Callback for any derived classes to play with */
locked_eventNewMsg(msg);
locked_eventNewMsg(&(git->second), msg, src);
/* else if group = subscribed | listener -> publish */
/* if it has come from us... then it has been published already */