summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/NodeI.cpp')
-rw-r--r--cpp/src/IceGrid/NodeI.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp
index 2d4b678c62e..1eed1b8bbf6 100644
--- a/cpp/src/IceGrid/NodeI.cpp
+++ b/cpp/src/IceGrid/NodeI.cpp
@@ -248,33 +248,25 @@ NodeI::loadServer_async(const AMD_Node_loadServerPtr& amdCB,
}
void
-NodeI::destroyServer_async(const AMD_Node_destroyServerPtr& amdCB, const string& serverId, const Ice::Current& current)
+NodeI::destroyServer_async(const AMD_Node_destroyServerPtr& amdCB,
+ const string& serverId,
+ const string& uuid,
+ int revision,
+ const Ice::Current& current)
{
Lock sync(*this);
++_serial;
ServerIPtr server = ServerIPtr::dynamicCast(_adapter->find(createServerIdentity(serverId)));
- if(server)
- {
- //
- // Destroy the server object if it's loaded.
- //
- server->destroy(amdCB);
- }
- else
+ if(!server)
{
- //
- // Delete the server directory from the disk.
- //
- try
- {
- removeRecursive(_serversDir + "/" + serverId);
- }
- catch(const string&)
- {
- }
- amdCB->ice_response();
+ server = new ServerI(this, 0, _serversDir, serverId, _waitTime);
}
+
+ //
+ // Destroy the server object if it's loaded.
+ //
+ server->destroy(amdCB, uuid, revision);
}
void
@@ -667,7 +659,7 @@ NodeI::checkConsistencyNoSync(const Ice::StringSeq& servers)
//
try
{
- server->destroy(0);
+ server->destroy(0, "", 0);
p = remove.erase(p);
continue;
}
@@ -768,6 +760,12 @@ NodeI::checkConsistencyNoSync(const Ice::StringSeq& servers)
}
}
+NodeSessionPrx
+NodeI::getMasterNodeSession() const
+{
+ return _sessions.getMasterNodeSession();
+}
+
bool
NodeI::canRemoveServerDirectory(const string& name)
{