summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-11-17 08:46:56 +0100
committerBenoit Foucher <benoit@zeroc.com>2015-11-17 08:46:56 +0100
commit9da93c90ccdc2430ce57b6eff59cdae4c919cf0e (patch)
treee7049bef3e36b073bae5dbb44b0ff671b70f0bf0 /cpp/src
parentRemoved filelock test (moved to freeze repo) (diff)
downloadice-9da93c90ccdc2430ce57b6eff59cdae4c919cf0e.tar.bz2
ice-9da93c90ccdc2430ce57b6eff59cdae4c919cf0e.tar.xz
ice-9da93c90ccdc2430ce57b6eff59cdae4c919cf0e.zip
Fixed ICE-6887 - Removed IceGrid createOrUpdateDirectory
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/ServerI.cpp22
-rw-r--r--cpp/src/IceGrid/ServerI.h9
2 files changed, 9 insertions, 22 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index 7fcc644b987..b5da40d73a1 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -2305,10 +2305,10 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor)
//
// Create or update the server directories exists.
//
- createOrUpdateDirectory(_serverDir);
- createOrUpdateDirectory(_serverDir + "/config");
- createOrUpdateDirectory(_serverDir + "/dbs");
- createOrUpdateDirectory(_serverDir + "/distrib");
+ IcePatch2Internal::createDirectory(_serverDir);
+ IcePatch2Internal::createDirectory(_serverDir + "/config");
+ IcePatch2Internal::createDirectory(_serverDir + "/dbs");
+ IcePatch2Internal::createDirectory(_serverDir + "/distrib");
//
// Create the configuration files, remove the old ones.
@@ -2379,7 +2379,7 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor)
knownDbEnvs.push_back((*q)->name);
string dbEnvHome = _serverDir + "/dbs/" + (*q)->name;
- createOrUpdateDirectory(dbEnvHome);
+ IcePatch2Internal::createDirectory(dbEnvHome);
if(!(*q)->properties.empty())
{
@@ -3042,18 +3042,6 @@ ServerI::setStateNoSync(InternalServerState st, const std::string& reason)
}
}
-void
-ServerI::createOrUpdateDirectory(const string& dir)
-{
- try
- {
- IcePatch2Internal::createDirectory(dir);
- }
- catch(const string&)
- {
- }
-}
-
ServerState
ServerI::toServerState(InternalServerState st) const
{
diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h
index b9ac1190a4e..0b2c9b53eb0 100644
--- a/cpp/src/IceGrid/ServerI.h
+++ b/cpp/src/IceGrid/ServerI.h
@@ -80,7 +80,7 @@ public:
virtual ServerState getState(const ::Ice::Current& = Ice::Current()) const;
virtual Ice::Int getPid(const ::Ice::Current& = Ice::Current()) const;
-
+
virtual void setEnabled(bool, const ::Ice::Current&);
virtual bool isEnabled(const ::Ice::Current& = Ice::Current()) const;
virtual void setProcess_async(const AMD_Server_setProcessPtr&, const ::Ice::ProcessPrx&, const ::Ice::Current&);
@@ -125,7 +125,7 @@ public:
void updateRuntimePropertiesCallback(const Ice::Exception&, const InternalServerDescriptorPtr&);
private:
-
+
void updateImpl(const InternalServerDescriptorPtr&);
void checkRevision(const std::string&, const std::string&, int) const;
void checkNoRestart(const InternalServerDescriptorPtr&);
@@ -138,8 +138,7 @@ private:
void setState(InternalServerState, const std::string& = std::string());
ServerCommandPtr nextCommand();
void setStateNoSync(InternalServerState, const std::string& = std::string());
-
- void createOrUpdateDirectory(const std::string&);
+
ServerState toServerState(InternalServerState) const;
ServerActivation toServerActivation(const std::string&) const;
ServerDynamicInfo getDynamicInfo() const;
@@ -180,7 +179,7 @@ private:
LoadCommandPtr _load;
PatchCommandPtr _patch;
StartCommandPtr _start;
-
+
int _pid;
};
typedef IceUtil::Handle<ServerI> ServerIPtr;