From 4e259fecfd06ebdfc078d2a011a15ed237203473 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 29 Sep 2013 12:10:59 +0000 Subject: [PATCH] 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 --- libretroshare/src/pqi/p3historymgr.cc | 2 +- retroshare-gui/src/gui/settings/ChatPage.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/p3historymgr.cc b/libretroshare/src/pqi/p3historymgr.cc index e8ef5b8ed..920e4e02a 100644 --- a/libretroshare/src/pqi/p3historymgr.cc +++ b/libretroshare/src/pqi/p3historymgr.cc @@ -158,7 +158,7 @@ void p3HistoryMgr::cleanOldMessages() for(std::map >::iterator mit = mMessages.begin(); mit != mMessages.end();) { for(std::map::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::iterator lit2 = lit ; ++lit2 ; diff --git a/retroshare-gui/src/gui/settings/ChatPage.ui b/retroshare-gui/src/gui/settings/ChatPage.ui index a95a538e4..76b2f1aeb 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.ui +++ b/retroshare-gui/src/gui/settings/ChatPage.ui @@ -662,7 +662,7 @@ - Maximum storage period, in days: + Maximum storage period, in days (0=keep all):