summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Database.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-01-17 13:20:58 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-01-17 13:20:58 +0000
commit9ff75a5104445c691aa5d659b88ea289dd6e3a39 (patch)
tree532b3ef052628d68c57855f8008da37c7dcfe1f2 /cpp/src/IceGrid/Database.cpp
parentFixed bug 1674 (diff)
downloadice-9ff75a5104445c691aa5d659b88ea289dd6e3a39.tar.bz2
ice-9ff75a5104445c691aa5d659b88ea289dd6e3a39.tar.xz
ice-9ff75a5104445c691aa5d659b88ea289dd6e3a39.zip
Fixed bug 1671 and other minor fixes
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r--cpp/src/IceGrid/Database.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index 02f3e7d87e4..aa4803f9269 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -516,7 +516,18 @@ Database::removeApplication(const string& name, AdminSessionI* session)
//
}
- _applications.erase(p);
+ startUpdating(name);
+ }
+
+ if(_master)
+ {
+ for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
+ for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::waitNoThrow));
+ }
+
+ {
+ Lock sync(*this);
+ _applications.erase(name);
++_applicationSerial;
serial = _applicationObserverTopic->applicationRemoved(_applicationSerial, name);
@@ -528,13 +539,9 @@ Database::removeApplication(const string& name, AdminSessionI* session)
}
}
- if(_master)
- {
- for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
- for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::waitNoThrow));
- }
-
_applicationObserverTopic->waitForSyncedSubscribers(serial);
+
+ finishUpdating(name);
}
ApplicationInfo