diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-11-13 10:17:27 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-11-13 10:17:27 +0100 |
commit | 99b44d083eeee5583adfe642081a827224fa1309 (patch) | |
tree | 46bb3af634cbd5d90b9e5d46099f4e0e85f70ec6 /cpp/src/Ice/EndpointI.cpp | |
parent | Cosmetic updates to IceGrid Admin connection wizard (diff) | |
download | ice-99b44d083eeee5583adfe642081a827224fa1309.tar.bz2 ice-99b44d083eeee5583adfe642081a827224fa1309.tar.xz ice-99b44d083eeee5583adfe642081a827224fa1309.zip |
Fixed ICE-4927: fixed proxy encoding to marshal protocol/encoding version instead of encoding it in endpoints
Diffstat (limited to 'cpp/src/Ice/EndpointI.cpp')
-rw-r--r-- | cpp/src/Ice/EndpointI.cpp | 71 |
1 files changed, 1 insertions, 70 deletions
diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp index e9762fe2eec..0115a5f31cc 100644 --- a/cpp/src/Ice/EndpointI.cpp +++ b/cpp/src/Ice/EndpointI.cpp @@ -46,18 +46,6 @@ Init init; Ice::LocalObject* IceInternal::upCast(EndpointI* p) { return p; } IceUtil::Shared* IceInternal::upCast(EndpointHostResolver* p) { return p; } -const Ice::EncodingVersion& -IceInternal::EndpointI::encodingVersion() const -{ - return _encoding; -} - -const Ice::ProtocolVersion& -IceInternal::EndpointI::protocolVersion() const -{ - return _protocol; -} - const string& IceInternal::EndpointI::connectionId() const { @@ -86,74 +74,17 @@ IceInternal::EndpointI::connectors(const vector<Address>& addrs) const return vector<ConnectorPtr>(); } -IceInternal::EndpointI::EndpointI(const Ice::ProtocolVersion& protocol, - const Ice::EncodingVersion& encoding, - const std::string& connectionId) : - _protocol(protocol), - _encoding(encoding), +IceInternal::EndpointI::EndpointI(const std::string& connectionId) : _connectionId(connectionId), _hashInitialized(false) { } IceInternal::EndpointI::EndpointI() : - _protocol(Ice::currentProtocol), - _encoding(Ice::currentEncoding), _hashInitialized(false) { } -void -IceInternal::EndpointI::parseOption(const string& option, const string& arg, const string& desc, const string& str) -{ - if(option == "-v") - { - if(arg.empty()) - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "no argument provided for -v option in endpoint `" + desc + " " + str + "'"; - throw ex; - } - - try - { - const_cast<Ice::ProtocolVersion&>(_protocol) = Ice::stringToProtocolVersion(arg); - } - catch(const Ice::VersionParseException& e) - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "invalid protocol version `" + arg + "' in endpoint `" + desc + " " + str + "':\n" + e.str; - throw ex; - } - } - else if(option == "-e") - { - if(arg.empty()) - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "no argument provided for -e option in endpoint `" + desc + " " + str + "'"; - throw ex; - } - - try - { - const_cast<Ice::EncodingVersion&>(_encoding) = Ice::stringToEncodingVersion(arg); - } - catch(const Ice::VersionParseException& e) - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "invalid encoding version `" + arg + "' in endpoint `" + desc + " " + str + "':\n" + e.str; - throw ex; - } - } - else - { - Ice::EndpointParseException ex(__FILE__, __LINE__); - ex.str = "unknown option `" + option + "' in `" + desc + " " + str + "'"; - throw ex; - } -} - #ifndef ICE_OS_WINRT IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& instance) : |