diff options
author | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
commit | 2380e089401d048490da23bc6d71e5687bafbe47 (patch) | |
tree | 6d97052d1f93bc2bafcd7fd1a9ebe103544b6cad /cpp/src/IceGrid/NodeCache.cpp | |
parent | Fixed permissions (diff) | |
parent | 3.3.1 third-party updates (diff) | |
download | ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.bz2 ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.xz ice-2380e089401d048490da23bc6d71e5687bafbe47.zip |
Merge branch 'R3_3_branch' of cvs:/home/git/ice into R3_3_branch
Conflicts:
java/resources/IceGridAdmin/icegridadmin_content_dyn.html
java/resources/IceGridAdmin/icegridadmin_content_static.html
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 812cb1977df..dc6eb107a11 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -746,8 +746,12 @@ NodeEntry::__decRef() void NodeEntry::checkSession() const { - if(_session && !_session->isDestroyed()) + if(_session) { + if(_session->isDestroyed()) + { + throw NodeUnreachableException(_name, "the node is not active"); + } return; } else if(!_proxy && !_registering) @@ -781,10 +785,13 @@ NodeEntry::checkSession() const while(_registering) { - wait(); + if(!timedWait(IceUtil::Time::seconds(5))) + { + break; // Consider the node down if it doesn't respond promptly. + } } - if(!_session) + if(!_session || _session->isDestroyed()) { throw NodeUnreachableException(_name, "the node is not active"); } @@ -970,5 +977,25 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const // forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), iceVersion))(info.descriptor); + // + // For Ice servers > 3.3.0 escape the properties. + // + if(iceVersion == 0 || iceVersion >= 30300) + { + PropertyDescriptorSeq newProps; + for(PropertyDescriptorSeq::const_iterator p = props.begin(); p != props.end(); ++p) + { + if(p->value.empty() && p->name.find('#') == 0) + { + newProps.push_back(createProperty(p->name)); + } + else + { + newProps.push_back(createProperty(escapeProperty(p->name), escapeProperty(p->value))); + } + } + server->properties["config"] = newProps; + } + return server; } |