for each channel msg post download request is now only called once.

also added logic to deal with case where auto dl has been disabled then re-enabled after a manual download

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4137 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-04-08 22:08:12 +00:00
parent bff095198c
commit 753804eee8

View File

@ -752,6 +752,22 @@ bool p3Channels::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, std
break;
}
mit2 = mChannelStatus.find(grpId);
if(mit2 != mChannelStatus.end())
{
if(!(mit2->second & RS_CHAN_STATUS_AUTO_DL)){
if(lit != mReadStatus.end()){
if(( mit1=(*lit)->msgReadStatus.find(msgId)) != (*lit)->msgReadStatus.end())
(*lit)->msgReadStatus[msgId] |= (CHANNEL_MSG_STATUS_MASK & CHANNEL_MSG_STATUS_DOWLOADED);
}
return false;
}
}
if(lit != mReadStatus.end()){
if(( mit1=(*lit)->msgReadStatus.find(msgId)) != (*lit)->msgReadStatus.end()){
@ -763,13 +779,7 @@ bool p3Channels::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, std
}
}
mit2 = mChannelStatus.find(grpId);
if(mit2 != mChannelStatus.end())
{
if(!(mit2->second & RS_CHAN_STATUS_AUTO_DL))
return false;
}
/* request the files
* NB: This will result in duplicates.