diff options
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r-- | cpp/src/IceGrid/Database.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 88b6f2fb9ea..9e05c898c84 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -209,25 +209,22 @@ Database::checkSessionLock(ObserverSessionI* session) { if(_lock != 0 && session != _lock) { - AccessDenied ex; + AccessDeniedException ex; ex.lockUserId = _lockUserId; throw ex; } } -void -Database::lock(int serial, ObserverSessionI* session, const string& userId) +int +Database::lock(ObserverSessionI* session, const string& userId) { Lock sync(*this); checkSessionLock(session); - if(serial != _serial) - { - throw CacheOutOfDate(); - } - _lock = session; _lockUserId = userId; + + return _serial; } void |