fixed: plugin ticket: when a session expires all files from editticket were removed

it should be removed only those new added


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@798 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-01-21 12:29:44 +00:00
parent 4311f06ade
commit c9931da5ba
11 changed files with 174 additions and 54 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* Copyright (c) 2008-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -50,6 +50,7 @@ Table::iterator i = table.begin();
while( i != table.end() )
{
cur->session = &(*i);
cur->session->plugin_data.DeleteAll(); // it's better to call it here instead of the destructor
table.erase(i++);
}
@@ -71,6 +72,10 @@ void SessionContainer::EraseById(IdIterator i)
cur->session = &(*i->second);
log << log4 << "SC: deleting session, id: " << i->second->id << logend;
// call first DeleteAll() because if not then it would be called from the desctructor
// and there'll be a problem if it throws an exception there
i->second->plugin_data.DeleteAll();
table.erase(i->second);
index_id.erase(i);
table_size -= 1;