allow max storage duration to be 0, in which case we keep all history

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-09-29 12:10:59 +00:00
parent 4dd77457ad
commit 4e259fecfd
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ void p3HistoryMgr::cleanOldMessages()
for(std::map<std::string, std::map<uint32_t, RsHistoryMsgItem*> >::iterator mit = mMessages.begin(); mit != mMessages.end();)
{
for(std::map<uint32_t, RsHistoryMsgItem*>::iterator lit = mit->second.begin();lit!=mit->second.end();)
if(lit->second->recvTime + mMaxStorageDurationSeconds < now)
if(mMaxStorageDurationSeconds > 0 && lit->second->recvTime + mMaxStorageDurationSeconds < now)
{
std::map<uint32_t, RsHistoryMsgItem*>::iterator lit2 = lit ;
++lit2 ;

View File

@ -662,7 +662,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Maximum storage period, in days:</string>
<string>Maximum storage period, in days (0=keep all):</string>
</property>
</widget>
</item>