diff options
Diffstat (limited to 'cpp/src/IceGrid/AdminSessionI.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdminSessionI.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index 5fe3f014d5f..db49207138d 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -219,44 +219,14 @@ AdminSessionI::openNodeStdErr(const std::string& name, const Ice::Current& curre FileIteratorPrx AdminSessionI::openRegistryStdOut(const std::string& name, const Ice::Current& current) { - FileReaderPrx reader; - if(name == _replicaName) - { - Ice::Identity internalRegistryId; - internalRegistryId.category = _database->getInstanceName(); - internalRegistryId.name = "InternalRegistry-" + _replicaName; - - Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - string proxyStr = communicator->identityToString(internalRegistryId); - reader = FileReaderPrx::uncheckedCast(communicator->stringToProxy(proxyStr)); - } - else - { - reader = _database->getReplica(name); - } - + FileReaderPrx reader = name == _replicaName ? _database->getInternalRegistry() : _database->getReplica(name); return addFileIterator(reader, "stdout", current); } FileIteratorPrx AdminSessionI::openRegistryStdErr(const std::string& name, const Ice::Current& current) { - FileReaderPrx reader; - if(name == _replicaName) - { - Ice::Identity internalRegistryId; - internalRegistryId.category = _database->getInstanceName(); - internalRegistryId.name = "InternalRegistry-" + _replicaName; - - Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - string proxyStr = communicator->identityToString(internalRegistryId); - reader = FileReaderPrx::uncheckedCast(communicator->stringToProxy(proxyStr)); - } - else - { - reader = _database->getReplica(name); - } - + FileReaderPrx reader = name == _replicaName ? _database->getInternalRegistry() : _database->getReplica(name); return addFileIterator(reader, "stderr", current); } |