From ba166110beb86f147aac6d221c9c41a1fb45d797 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Fri, 1 Feb 2013 18:15:57 +0100 Subject: Fix for ICE-5140 - an opaque endpoint which doesn't specify -e is assumed to be a 1.0 encoded endpoint --- cpp/src/Ice/EndpointFactoryManager.cpp | 2 +- cpp/src/Ice/InstrumentationI.cpp | 22 ++++++---------------- cpp/src/Ice/OpaqueEndpointI.cpp | 8 +++----- cpp/src/Ice/OpaqueEndpointI.h | 3 +-- 4 files changed, 11 insertions(+), 24 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/Ice/EndpointFactoryManager.cpp b/cpp/src/Ice/EndpointFactoryManager.cpp index 6cfe7757c82..8ce75b7f108 100644 --- a/cpp/src/Ice/EndpointFactoryManager.cpp +++ b/cpp/src/Ice/EndpointFactoryManager.cpp @@ -131,7 +131,7 @@ IceInternal::EndpointFactoryManager::create(const string& str, bool oaEndpoint) // if(protocol == "opaque") { - EndpointIPtr ue = new OpaqueEndpointI(str.substr(end), _instance); + EndpointIPtr ue = new OpaqueEndpointI(str.substr(end)); factory = get(ue->type()); if(factory) { diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp index e5a15432fd1..023e4669c09 100644 --- a/cpp/src/Ice/InstrumentationI.cpp +++ b/cpp/src/Ice/InstrumentationI.cpp @@ -560,24 +560,14 @@ private: const ConnectionInfoPtr& _connectionInfo; const EndpointPtr& _endpoint; -// -// Clang 4.2 reports unused-private-field for the _requestId -// field that is only used in the nested Attributes class. -// -#ifdef __clang__ -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wunused-private-field" -#endif - +protected: + // + // COMPILERFIX: Clang 4.2 reports unused-private-field for the _requestId + // field that is only used in the nested Attributes class. + // const int _requestId; -// -// Restore diagnostic to previous state. -// -#ifdef __clang__ -# pragma clang diagnostic pop -#endif - +private: const int _size; mutable string _id; mutable EndpointInfoPtr _endpointInfo; diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp index cfad09c13e8..f33c5da2adb 100644 --- a/cpp/src/Ice/OpaqueEndpointI.cpp +++ b/cpp/src/Ice/OpaqueEndpointI.cpp @@ -10,20 +10,18 @@ #include #include #include -#include #include #include #include +#include using namespace std; using namespace Ice; using namespace IceInternal; -IceInternal::OpaqueEndpointI::OpaqueEndpointI(const string& str, const InstancePtr& instance) : - EndpointI("") +IceInternal::OpaqueEndpointI::OpaqueEndpointI(const string& str) : + EndpointI(""), _rawEncoding(Encoding_1_0) { - _rawEncoding = instance->defaultsAndOverrides()->defaultEncoding; - const string delim = " \t\n\r"; string::size_type beg; diff --git a/cpp/src/Ice/OpaqueEndpointI.h b/cpp/src/Ice/OpaqueEndpointI.h index 53041b42058..303537ac7a2 100644 --- a/cpp/src/Ice/OpaqueEndpointI.h +++ b/cpp/src/Ice/OpaqueEndpointI.h @@ -12,7 +12,6 @@ #include #include -#include namespace IceInternal { @@ -21,7 +20,7 @@ class OpaqueEndpointI : public EndpointI { public: - OpaqueEndpointI(const ::std::string&, const InstancePtr&); + OpaqueEndpointI(const ::std::string&); OpaqueEndpointI(Ice::Short, BasicStream*); virtual void streamWrite(BasicStream*) const; -- cgit v1.2.3