summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Database.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-09-06 08:14:14 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-09-06 08:14:14 +0000
commitf5be93b85788a110f1c6c6edf2550bba1a74f585 (patch)
tree57183bda04d4b974b4ac3e4152a93ae010f45b6f /cpp/src/IceGrid/Database.cpp
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=448 (diff)
downloadice-f5be93b85788a110f1c6c6edf2550bba1a74f585.tar.bz2
ice-f5be93b85788a110f1c6c6edf2550bba1a74f585.tar.xz
ice-f5be93b85788a110f1c6c6edf2550bba1a74f585.zip
startUpdate doesn't throw CacheOutOfDate anymore but instead return the
current serial.
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r--cpp/src/IceGrid/Database.cpp13
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