zeroc-ice 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +29 -11
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +26 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +14 -11
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +57 -23
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +99 -44
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
- data/dist/ice/cpp/include/generated/Ice/Router.h +55 -19
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +6 -4
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +121 -108
- data/dist/ice/cpp/src/Ice/ConnectionI.h +12 -9
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +15 -79
- data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +2 -4
- data/dist/ice/cpp/src/Ice/InputStream.cpp +50 -33
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +7 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +2 -2
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
- data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +50 -65
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +37 -26
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +26 -13
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +27 -12
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +1 -4
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +165 -80
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +73 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +110 -17
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +6 -3
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +214 -34
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +13 -2
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +32 -26
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +6 -4
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +34 -14
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
- data/dist/ice/cpp/src/Slice/Parser.cpp +145 -97
- data/dist/ice/cpp/src/Slice/Parser.h +22 -8
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +77 -29
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -3
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +203 -172
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -12
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +26 -20
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Identity.ice +3 -0
- data/dist/ice/slice/Ice/Locator.ice +6 -5
- data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
- data/dist/ice/slice/Ice/Metrics.ice +7 -6
- data/dist/ice/slice/Ice/OperationMode.ice +8 -0
- data/dist/ice/slice/Ice/Process.ice +3 -0
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
- data/dist/lib/Glacier2/Router.rb +9 -9
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +15 -15
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/LocalExceptions.rb +3 -0
- data/dist/lib/Ice/Locator.rb +5 -5
- data/dist/lib/Ice/LocatorRegistry.rb +4 -4
- data/dist/lib/Ice/Metrics.rb +7 -7
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +3 -3
- data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/ProxyFunctions.rb +8 -4
- data/dist/lib/Ice/RemoteLogger.rb +7 -8
- data/dist/lib/Ice/ReplyStatus.rb +4 -4
- data/dist/lib/Ice/Router.rb +5 -5
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +8 -8
- data/dist/lib/IceGrid/Admin.rb +85 -86
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +2 -2
- data/dist/lib/IceGrid/Registry.rb +14 -15
- data/dist/lib/IceGrid/Session.rb +7 -7
- data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
- data/dist/lib/IceStorm/IceStorm.rb +16 -16
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +5 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
|
@@ -68,6 +68,10 @@ Ice::OutputStream::OutputStream(
|
|
|
68
68
|
_format(format),
|
|
69
69
|
_currentEncaps(nullptr)
|
|
70
70
|
{
|
|
71
|
+
if (!_wstringConverter)
|
|
72
|
+
{
|
|
73
|
+
_wstringConverter = getProcessWstringConverter();
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
Ice::OutputStream::OutputStream(
|
|
@@ -85,6 +89,11 @@ Ice::OutputStream::OutputStream(
|
|
|
85
89
|
_currentEncaps(nullptr)
|
|
86
90
|
{
|
|
87
91
|
b.reset();
|
|
92
|
+
|
|
93
|
+
if (!_wstringConverter)
|
|
94
|
+
{
|
|
95
|
+
_wstringConverter = getProcessWstringConverter();
|
|
96
|
+
}
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
Ice::OutputStream::OutputStream(const CommunicatorPtr& communicator, EncodingVersion encoding)
|
|
@@ -104,6 +113,7 @@ Ice::OutputStream::OutputStream(Instance* instance, EncodingVersion encoding)
|
|
|
104
113
|
instance->getStringConverter(),
|
|
105
114
|
instance->getWstringConverter())
|
|
106
115
|
{
|
|
116
|
+
assert(_wstringConverter);
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
Ice::OutputStream::OutputStream(OutputStream&& other) noexcept
|
|
@@ -116,6 +126,7 @@ Ice::OutputStream::OutputStream(OutputStream&& other) noexcept
|
|
|
116
126
|
_currentEncaps(other._currentEncaps)
|
|
117
127
|
{
|
|
118
128
|
// Reset other to its default state.
|
|
129
|
+
other._wstringConverter = getProcessWstringConverter();
|
|
119
130
|
other._closure = nullptr;
|
|
120
131
|
other._encoding = Encoding_1_1;
|
|
121
132
|
other._format = FormatType::CompactFormat;
|
|
@@ -140,6 +151,7 @@ Ice::OutputStream::operator=(OutputStream&& other) noexcept
|
|
|
140
151
|
_currentEncaps = other._currentEncaps;
|
|
141
152
|
|
|
142
153
|
// Reset other to its default state.
|
|
154
|
+
other._wstringConverter = getProcessWstringConverter();
|
|
143
155
|
other._closure = nullptr;
|
|
144
156
|
other._encoding = Encoding_1_1;
|
|
145
157
|
other._format = FormatType::CompactFormat;
|
|
@@ -294,7 +306,7 @@ Ice::OutputStream::writeEncapsulation(const byte* v, int32_t sz)
|
|
|
294
306
|
|
|
295
307
|
Container::size_type position = b.size();
|
|
296
308
|
resize(position + static_cast<size_t>(sz));
|
|
297
|
-
memcpy(&b[position],
|
|
309
|
+
memcpy(&b[position], v, static_cast<size_t>(sz));
|
|
298
310
|
}
|
|
299
311
|
|
|
300
312
|
void
|
|
@@ -326,7 +338,7 @@ Ice::OutputStream::writeBlob(const vector<byte>& v)
|
|
|
326
338
|
{
|
|
327
339
|
Container::size_type pos = b.size();
|
|
328
340
|
resize(pos + v.size());
|
|
329
|
-
memcpy(&b[pos],
|
|
341
|
+
memcpy(&b[pos], v.data(), v.size());
|
|
330
342
|
}
|
|
331
343
|
}
|
|
332
344
|
|
|
@@ -703,13 +715,7 @@ Ice::OutputStream::write(const char*)
|
|
|
703
715
|
void
|
|
704
716
|
Ice::OutputStream::writeConverted(const char* vdata, size_t vsize)
|
|
705
717
|
{
|
|
706
|
-
|
|
707
|
-
if (!stringConverter)
|
|
708
|
-
{
|
|
709
|
-
stringConverter = getProcessStringConverter();
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
if (!stringConverter)
|
|
718
|
+
if (!_stringConverter)
|
|
713
719
|
{
|
|
714
720
|
// No converter installed; write the string as-is (assumed to be UTF-8 already).
|
|
715
721
|
writeSize(static_cast<int32_t>(vsize));
|
|
@@ -735,7 +741,7 @@ Ice::OutputStream::writeConverted(const char* vdata, size_t vsize)
|
|
|
735
741
|
auto sizePos = startOneByteSize();
|
|
736
742
|
|
|
737
743
|
StreamUTF8BufferI buffer(*this);
|
|
738
|
-
byte* lastByte =
|
|
744
|
+
byte* lastByte = _stringConverter->toUTF8(vdata, vdata + vsize, buffer);
|
|
739
745
|
if (lastByte != b.end())
|
|
740
746
|
{
|
|
741
747
|
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
@@ -750,7 +756,7 @@ Ice::OutputStream::writeConverted(const char* vdata, size_t vsize)
|
|
|
750
756
|
auto sizePos = startSize();
|
|
751
757
|
|
|
752
758
|
StreamUTF8BufferI buffer(*this);
|
|
753
|
-
byte* lastByte =
|
|
759
|
+
byte* lastByte = _stringConverter->toUTF8(vdata, vdata + vsize, buffer);
|
|
754
760
|
if (lastByte != b.end())
|
|
755
761
|
{
|
|
756
762
|
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
@@ -788,68 +794,47 @@ Ice::OutputStream::write(wstring_view v)
|
|
|
788
794
|
return;
|
|
789
795
|
}
|
|
790
796
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
//
|
|
794
|
-
|
|
795
|
-
|
|
797
|
+
assert(_wstringConverter);
|
|
798
|
+
|
|
799
|
+
// The worst-case expansion for converting a wide string to UTF-8 is 3x or 4x depending on the platform.
|
|
800
|
+
const size_t factor = sizeof(wchar_t) == 2 ? 3 : 4;
|
|
801
|
+
|
|
796
802
|
try
|
|
797
803
|
{
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
804
|
+
// (252 / 3 = 84, 252 / 4 = 63)
|
|
805
|
+
if (v.size() <= 252 / factor)
|
|
806
|
+
{
|
|
807
|
+
// The maximum UTF-8 size is v.size() * factor <= 252, which fits in a 1-byte size encoding.
|
|
808
|
+
// We use this upper bound to decide the size encoding:
|
|
809
|
+
// - If v.size() <= 252 / factor, the converted string is at most 252 bytes, which always fits in a 1-byte
|
|
810
|
+
// size.
|
|
811
|
+
// - Otherwise, we use the 5-byte size encoding to avoid guessing and memmove fixups.
|
|
812
|
+
auto sizePos = startOneByteSize();
|
|
803
813
|
|
|
804
|
-
|
|
814
|
+
StreamUTF8BufferI buffer(*this);
|
|
815
|
+
byte* lastByte = _wstringConverter->toUTF8(v.data(), v.data() + v.size(), buffer);
|
|
816
|
+
if (lastByte != b.end())
|
|
817
|
+
{
|
|
818
|
+
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
819
|
+
}
|
|
805
820
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
{
|
|
809
|
-
wstringConverter = getProcessWstringConverter();
|
|
821
|
+
endOneByteSize(sizePos);
|
|
822
|
+
return;
|
|
810
823
|
}
|
|
811
|
-
|
|
812
|
-
lastByte = wstringConverter->toUTF8(v.data(), v.data() + v.size(), buffer);
|
|
813
|
-
|
|
814
|
-
if (lastByte != b.end())
|
|
824
|
+
else
|
|
815
825
|
{
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
auto actualSize = static_cast<int32_t>(lastIndex - firstIndex);
|
|
826
|
+
// Write the first byte of the 5-byte size encoding, followed by a 4-byte size placeholder.
|
|
827
|
+
write(uint8_t(255));
|
|
828
|
+
auto sizePos = startSize();
|
|
821
829
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
if (guessedSize != actualSize)
|
|
826
|
-
{
|
|
827
|
-
if (guessedSize <= 254 && actualSize > 254)
|
|
828
|
-
{
|
|
829
|
-
//
|
|
830
|
-
// Move the UTF-8 sequence 4 bytes further
|
|
831
|
-
// Use memmove instead of memcpy since the source and destination typically overlap.
|
|
832
|
-
//
|
|
833
|
-
resize(b.size() + 4);
|
|
834
|
-
memmove(b.begin() + firstIndex + 4, b.begin() + firstIndex, static_cast<size_t>(actualSize));
|
|
835
|
-
}
|
|
836
|
-
else if (guessedSize > 254 && actualSize <= 254)
|
|
830
|
+
StreamUTF8BufferI buffer(*this);
|
|
831
|
+
byte* lastByte = _wstringConverter->toUTF8(v.data(), v.data() + v.size(), buffer);
|
|
832
|
+
if (lastByte != b.end())
|
|
837
833
|
{
|
|
838
|
-
|
|
839
|
-
// Move the UTF-8 sequence 4 bytes back
|
|
840
|
-
//
|
|
841
|
-
memmove(b.begin() + firstIndex - 4, b.begin() + firstIndex, static_cast<size_t>(actualSize));
|
|
842
|
-
resize(b.size() - 4);
|
|
834
|
+
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
843
835
|
}
|
|
844
836
|
|
|
845
|
-
|
|
846
|
-
{
|
|
847
|
-
rewriteSize(actualSize, b.begin() + firstIndex - 1);
|
|
848
|
-
}
|
|
849
|
-
else
|
|
850
|
-
{
|
|
851
|
-
rewriteSize(actualSize, b.begin() + firstIndex - 1 - 4);
|
|
852
|
-
}
|
|
837
|
+
endSize(sizePos);
|
|
853
838
|
}
|
|
854
839
|
}
|
|
855
840
|
catch (const Ice::IllegalConversionException& ex)
|
|
@@ -1021,7 +1006,7 @@ void
|
|
|
1021
1006
|
Ice::OutputStream::EncapsEncoder10::write(const UserException& v)
|
|
1022
1007
|
{
|
|
1023
1008
|
//
|
|
1024
|
-
// User
|
|
1009
|
+
// User exceptions with the 1.0 encoding start with a boolean
|
|
1025
1010
|
// flag that indicates whether or not the exception uses
|
|
1026
1011
|
// classes.
|
|
1027
1012
|
//
|
|
@@ -1413,7 +1398,7 @@ Ice::OutputStream::EncapsEncoder11::writeInstance(const shared_ptr<Value>& v)
|
|
|
1413
1398
|
assert(v);
|
|
1414
1399
|
|
|
1415
1400
|
//
|
|
1416
|
-
// If the instance was already marshaled, just write
|
|
1401
|
+
// If the instance was already marshaled, just write its ID.
|
|
1417
1402
|
//
|
|
1418
1403
|
auto q = _marshaledMap.find(v);
|
|
1419
1404
|
if (q != _marshaledMap.end())
|
|
@@ -279,7 +279,13 @@ Ice::PluginManagerI::loadPlugin(PluginFactoryFunc factoryFunc, const string& nam
|
|
|
279
279
|
"invalid arguments for plug-in '" + name + "':\n" + string{ex.what()});
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
|
|
282
|
+
if (args.empty())
|
|
283
|
+
{
|
|
284
|
+
throw PluginInitializationException(
|
|
285
|
+
__FILE__,
|
|
286
|
+
__LINE__,
|
|
287
|
+
"no entry point specified for plug-in '" + name + "'");
|
|
288
|
+
}
|
|
283
289
|
|
|
284
290
|
//
|
|
285
291
|
// Shift the arguments.
|
|
@@ -315,6 +315,7 @@ Ice::Properties::getPropertyAsListWithDefault(string_view key, const StringSeq&
|
|
|
315
315
|
{
|
|
316
316
|
Warning out(getProcessLogger());
|
|
317
317
|
out << "mismatched quotes in property " << key << "'s value, returning default value";
|
|
318
|
+
return value;
|
|
318
319
|
}
|
|
319
320
|
if (result.size() == 0)
|
|
320
321
|
{
|
|
@@ -359,27 +360,28 @@ Ice::Properties::setProperty(string_view key, string_view value)
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
// Check if the property is in an Ice property prefix. If so, check that it's a valid property.
|
|
362
|
-
if (auto propertyArray = findIcePropertyArray(
|
|
363
|
+
if (auto propertyArray = findIcePropertyArray(currentKey))
|
|
363
364
|
{
|
|
364
365
|
if (propertyArray->isOptIn &&
|
|
365
366
|
find(_optInPrefixes.begin(), _optInPrefixes.end(), propertyArray->name) == _optInPrefixes.end())
|
|
366
367
|
{
|
|
367
368
|
ostringstream os;
|
|
368
|
-
os << "unable to set '" <<
|
|
369
|
+
os << "unable to set '" << currentKey << "': property prefix '" << propertyArray->name
|
|
369
370
|
<< "' is opt-in and must be explicitly enabled.";
|
|
370
371
|
throw PropertyException{__FILE__, __LINE__, os.str()};
|
|
371
372
|
}
|
|
372
373
|
string propertyPrefix{propertyArray->name};
|
|
373
|
-
auto prop =
|
|
374
|
+
auto prop =
|
|
375
|
+
IceInternal::findProperty(string_view{currentKey}.substr(propertyPrefix.length() + 1), propertyArray);
|
|
374
376
|
if (!prop)
|
|
375
377
|
{
|
|
376
|
-
throw PropertyException{__FILE__, __LINE__, "unknown Ice property: " +
|
|
378
|
+
throw PropertyException{__FILE__, __LINE__, "unknown Ice property: " + currentKey};
|
|
377
379
|
}
|
|
378
380
|
|
|
379
381
|
// If the property is deprecated, log a warning.
|
|
380
382
|
if (prop->deprecated)
|
|
381
383
|
{
|
|
382
|
-
getProcessLogger()->warning("setting deprecated property: " +
|
|
384
|
+
getProcessLogger()->warning("setting deprecated property: " + currentKey);
|
|
383
385
|
}
|
|
384
386
|
}
|
|
385
387
|
|
|
@@ -495,7 +497,15 @@ Ice::Properties::load(string_view file)
|
|
|
495
497
|
DWORD keyType;
|
|
496
498
|
DWORD nameBufSize = static_cast<DWORD>(nameBuf.size());
|
|
497
499
|
DWORD dataBufSize = static_cast<DWORD>(dataBuf.size());
|
|
498
|
-
err = RegEnumValueW(
|
|
500
|
+
err = RegEnumValueW(
|
|
501
|
+
iceKey,
|
|
502
|
+
i,
|
|
503
|
+
nameBuf.data(),
|
|
504
|
+
&nameBufSize,
|
|
505
|
+
nullptr,
|
|
506
|
+
&keyType,
|
|
507
|
+
dataBuf.data(),
|
|
508
|
+
&dataBufSize);
|
|
499
509
|
if (err != ERROR_SUCCESS || nameBufSize == 0)
|
|
500
510
|
{
|
|
501
511
|
ostringstream os;
|
|
@@ -503,7 +513,7 @@ Ice::Properties::load(string_view file)
|
|
|
503
513
|
<< ":\n";
|
|
504
514
|
if (nameBufSize == 0)
|
|
505
515
|
{
|
|
506
|
-
os << "property name
|
|
516
|
+
os << "property name cannot be the empty string";
|
|
507
517
|
}
|
|
508
518
|
else
|
|
509
519
|
{
|
|
@@ -512,8 +522,7 @@ Ice::Properties::load(string_view file)
|
|
|
512
522
|
getProcessLogger()->warning(os.str());
|
|
513
523
|
continue;
|
|
514
524
|
}
|
|
515
|
-
string name =
|
|
516
|
-
wstringToString(wstring(reinterpret_cast<wchar_t*>(&nameBuf[0]), nameBufSize), stringConverter);
|
|
525
|
+
string name = wstringToString(wstring(nameBuf.data(), nameBufSize), stringConverter);
|
|
517
526
|
if (keyType != REG_SZ && keyType != REG_EXPAND_SZ)
|
|
518
527
|
{
|
|
519
528
|
ostringstream os;
|
|
@@ -523,7 +532,8 @@ Ice::Properties::load(string_view file)
|
|
|
523
532
|
}
|
|
524
533
|
|
|
525
534
|
string value;
|
|
526
|
-
wstring valueW =
|
|
535
|
+
wstring valueW =
|
|
536
|
+
wstring(reinterpret_cast<wchar_t*>(dataBuf.data()), (dataBufSize / sizeof(wchar_t)) - 1);
|
|
527
537
|
if (keyType == REG_SZ)
|
|
528
538
|
{
|
|
529
539
|
value = wstringToString(valueW, stringConverter);
|
|
@@ -533,14 +543,14 @@ Ice::Properties::load(string_view file)
|
|
|
533
543
|
vector<wchar_t> expandedValue(1024);
|
|
534
544
|
DWORD sz = ExpandEnvironmentStringsW(
|
|
535
545
|
valueW.c_str(),
|
|
536
|
-
|
|
546
|
+
expandedValue.data(),
|
|
537
547
|
static_cast<DWORD>(expandedValue.size()));
|
|
538
548
|
if (sz >= expandedValue.size())
|
|
539
549
|
{
|
|
540
550
|
expandedValue.resize(sz + 1);
|
|
541
551
|
if (ExpandEnvironmentStringsW(
|
|
542
552
|
valueW.c_str(),
|
|
543
|
-
|
|
553
|
+
expandedValue.data(),
|
|
544
554
|
static_cast<DWORD>(expandedValue.size())) == 0)
|
|
545
555
|
{
|
|
546
556
|
ostringstream os;
|
|
@@ -551,7 +561,7 @@ Ice::Properties::load(string_view file)
|
|
|
551
561
|
continue;
|
|
552
562
|
}
|
|
553
563
|
}
|
|
554
|
-
value = wstringToString(wstring(
|
|
564
|
+
value = wstringToString(wstring(expandedValue.data(), sz - 1), stringConverter);
|
|
555
565
|
}
|
|
556
566
|
setProperty(name, value);
|
|
557
567
|
}
|
|
@@ -893,15 +903,15 @@ Ice::Properties::loadConfig()
|
|
|
893
903
|
{
|
|
894
904
|
#ifdef _WIN32
|
|
895
905
|
vector<wchar_t> v(256);
|
|
896
|
-
DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG",
|
|
906
|
+
DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG", v.data(), static_cast<DWORD>(v.size()));
|
|
897
907
|
if (ret >= v.size())
|
|
898
908
|
{
|
|
899
909
|
v.resize(ret + 1);
|
|
900
|
-
ret = GetEnvironmentVariableW(L"ICE_CONFIG",
|
|
910
|
+
ret = GetEnvironmentVariableW(L"ICE_CONFIG", v.data(), static_cast<DWORD>(v.size()));
|
|
901
911
|
}
|
|
902
912
|
if (ret > 0)
|
|
903
913
|
{
|
|
904
|
-
value = wstringToString(wstring(
|
|
914
|
+
value = wstringToString(wstring(v.data(), ret), getProcessStringConverter());
|
|
905
915
|
}
|
|
906
916
|
else
|
|
907
917
|
{
|
|
@@ -70,6 +70,7 @@ const PropertyArray PropertyNames::ThreadPoolProps
|
|
|
70
70
|
const Property ObjectAdapterPropsData[] =
|
|
71
71
|
{
|
|
72
72
|
Property{"AdapterId", "", false, false, nullptr},
|
|
73
|
+
Property{"AllowedOrigins", "", false, false, nullptr},
|
|
73
74
|
Property{"Connection", "", false, false, &PropertyNames::ConnectionProps},
|
|
74
75
|
Property{"Endpoints", "", false, false, nullptr},
|
|
75
76
|
Property{"Locator", "", false, false, &PropertyNames::ProxyProps},
|
|
@@ -89,7 +90,7 @@ const PropertyArray PropertyNames::ObjectAdapterProps
|
|
|
89
90
|
.prefixOnly=true,
|
|
90
91
|
.isOptIn=false,
|
|
91
92
|
.properties=ObjectAdapterPropsData,
|
|
92
|
-
.length=
|
|
93
|
+
.length=13
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
const Property IcePropsData[] =
|
|
@@ -82,7 +82,7 @@ IceInternal::validatePropertiesWithPrefix(
|
|
|
82
82
|
PropertyDict props = properties->getPropertiesForPrefix(string{prefix} + ".");
|
|
83
83
|
for (const auto& p : props)
|
|
84
84
|
{
|
|
85
|
-
// Plus one to
|
|
85
|
+
// Plus one to skip the dot.
|
|
86
86
|
if (!findProperty(p.first.substr(prefix.size() + 1), propertyArray))
|
|
87
87
|
{
|
|
88
88
|
unknownProps.push_back(p.first);
|
|
@@ -136,17 +136,6 @@ IceInternal::ProtocolInstance::defaultSourceAddress() const
|
|
|
136
136
|
return instance->defaultsAndOverrides()->defaultSourceAddress;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
const EncodingVersion&
|
|
140
|
-
IceInternal::ProtocolInstance::defaultEncoding() const
|
|
141
|
-
{
|
|
142
|
-
InstancePtr instance = _instance.lock();
|
|
143
|
-
if (!instance)
|
|
144
|
-
{
|
|
145
|
-
throw CommunicatorDestroyedException{__FILE__, __LINE__};
|
|
146
|
-
}
|
|
147
|
-
return instance->defaultsAndOverrides()->defaultEncoding;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
139
|
NetworkProxyPtr
|
|
151
140
|
IceInternal::ProtocolInstance::networkProxy() const
|
|
152
141
|
{
|
|
@@ -45,7 +45,6 @@ namespace IceInternal
|
|
|
45
45
|
[[nodiscard]] ProtocolSupport protocolSupport() const;
|
|
46
46
|
[[nodiscard]] const std::string& defaultHost() const;
|
|
47
47
|
[[nodiscard]] const Address& defaultSourceAddress() const;
|
|
48
|
-
[[nodiscard]] const Ice::EncodingVersion& defaultEncoding() const;
|
|
49
48
|
[[nodiscard]] NetworkProxyPtr networkProxy() const;
|
|
50
49
|
[[nodiscard]] std::int32_t messageSizeMax() const;
|
|
51
50
|
|
|
@@ -60,7 +59,7 @@ namespace IceInternal
|
|
|
60
59
|
ProtocolInstance(const InstancePtr&, std::int16_t, std::string, bool);
|
|
61
60
|
friend class Instance;
|
|
62
61
|
// Use a weak pointer to avoid circular references. The communicator owns the endpoint factory, which in
|
|
63
|
-
// turn
|
|
62
|
+
// turn owns this protocol instance.
|
|
64
63
|
const std::weak_ptr<Instance> _instance;
|
|
65
64
|
const int _traceLevel;
|
|
66
65
|
const std::string _traceCategory;
|
|
@@ -207,7 +207,15 @@ Ice::ObjectPrx::ice_isFixed() const noexcept
|
|
|
207
207
|
ConnectionPtr
|
|
208
208
|
Ice::ObjectPrx::ice_getCachedConnection() const noexcept
|
|
209
209
|
{
|
|
210
|
-
return
|
|
210
|
+
// A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
|
|
211
|
+
if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
|
|
212
|
+
{
|
|
213
|
+
return fixedReference->fixedConnection();
|
|
214
|
+
}
|
|
215
|
+
else
|
|
216
|
+
{
|
|
217
|
+
return _requestHandlerCache->getCachedConnection();
|
|
218
|
+
}
|
|
211
219
|
}
|
|
212
220
|
|
|
213
221
|
CommunicatorPtr
|
|
@@ -6,10 +6,15 @@
|
|
|
6
6
|
#include "CollocatedRequestHandler.h"
|
|
7
7
|
#include "ConnectionI.h"
|
|
8
8
|
#include "Ice/InputStream.h"
|
|
9
|
+
#include "Ice/LoggerUtil.h"
|
|
9
10
|
#include "Ice/OutgoingAsync.h"
|
|
10
11
|
#include "Ice/OutputStream.h"
|
|
11
12
|
#include "Ice/Proxy.h"
|
|
13
|
+
#include "Instance.h"
|
|
14
|
+
#include "Reference.h"
|
|
12
15
|
#include "ReferenceFactory.h"
|
|
16
|
+
#include "RequestHandler.h"
|
|
17
|
+
#include "ThreadPool.h"
|
|
13
18
|
|
|
14
19
|
using namespace std;
|
|
15
20
|
using namespace Ice;
|
|
@@ -77,7 +82,20 @@ namespace IceInternal
|
|
|
77
82
|
: ProxyGetConnection(std::move(proxy)),
|
|
78
83
|
LambdaInvoke(std::move(ex), std::move(sent))
|
|
79
84
|
{
|
|
80
|
-
_response = [
|
|
85
|
+
_response = [this, response = std::move(response)](bool)
|
|
86
|
+
{
|
|
87
|
+
if (response)
|
|
88
|
+
{
|
|
89
|
+
try
|
|
90
|
+
{
|
|
91
|
+
response(getConnection());
|
|
92
|
+
}
|
|
93
|
+
catch (...)
|
|
94
|
+
{
|
|
95
|
+
warning("response", std::current_exception());
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
81
99
|
}
|
|
82
100
|
};
|
|
83
101
|
|
|
@@ -172,13 +190,14 @@ namespace IceInternal
|
|
|
172
190
|
{
|
|
173
191
|
_response = [this, response = std::move(response)](bool ok)
|
|
174
192
|
{
|
|
175
|
-
|
|
193
|
+
R v = this->_is.b.empty() ? R{ok, {}} : this->_read(ok, &this->_is);
|
|
194
|
+
try
|
|
176
195
|
{
|
|
177
|
-
response(
|
|
196
|
+
response(std::move(v));
|
|
178
197
|
}
|
|
179
|
-
|
|
198
|
+
catch (...)
|
|
180
199
|
{
|
|
181
|
-
|
|
200
|
+
this->warning("response", std::current_exception());
|
|
182
201
|
}
|
|
183
202
|
};
|
|
184
203
|
}
|
|
@@ -282,6 +301,18 @@ ProxyGetConnection::ProxyGetConnection(ObjectPrx proxy) : ProxyOutgoingAsyncBase
|
|
|
282
301
|
AsyncStatus
|
|
283
302
|
ProxyGetConnection::invokeRemote(const ConnectionIPtr& connection, bool, bool)
|
|
284
303
|
{
|
|
304
|
+
// A fixed proxy never reaches the invocation machinery: invoke returns its bound connection directly.
|
|
305
|
+
assert(!_proxy.ice_isFixed());
|
|
306
|
+
try
|
|
307
|
+
{
|
|
308
|
+
connection->throwException();
|
|
309
|
+
}
|
|
310
|
+
catch (const Ice::LocalException&)
|
|
311
|
+
{
|
|
312
|
+
// The connection is closed: throw RetryException so that the caller clears the cached request handler
|
|
313
|
+
// and calls invokeRemote again with a new connection.
|
|
314
|
+
throw RetryException(current_exception());
|
|
315
|
+
}
|
|
285
316
|
_cachedConnection = connection;
|
|
286
317
|
if (responseImpl(true, true))
|
|
287
318
|
{
|
|
@@ -602,7 +633,15 @@ Ice::ObjectPrx::ice_invokeAsync(
|
|
|
602
633
|
Ice::ConnectionPtr
|
|
603
634
|
Ice::ObjectPrx::ice_getConnection() const
|
|
604
635
|
{
|
|
605
|
-
return
|
|
636
|
+
// A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
|
|
637
|
+
if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
|
|
638
|
+
{
|
|
639
|
+
return fixedReference->fixedConnection();
|
|
640
|
+
}
|
|
641
|
+
else
|
|
642
|
+
{
|
|
643
|
+
return ice_getConnectionAsync().get();
|
|
644
|
+
}
|
|
606
645
|
}
|
|
607
646
|
|
|
608
647
|
std::function<void()>
|
|
@@ -611,18 +650,76 @@ Ice::ObjectPrx::ice_getConnectionAsync(
|
|
|
611
650
|
std::function<void(std::exception_ptr)> ex,
|
|
612
651
|
std::function<void(bool)> sent) const
|
|
613
652
|
{
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
653
|
+
// A fixed proxy is bound to a single connection: return this connection as is, whatever its state. The response
|
|
654
|
+
// callback is executed from the thread pool that services this connection (or by the executor, if set). Like for
|
|
655
|
+
// the response callback of a lambda invocation, an exception thrown by the callback is logged as an
|
|
656
|
+
// Ice.Warn.AMICallback warning.
|
|
657
|
+
if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
|
|
658
|
+
{
|
|
659
|
+
if (response)
|
|
660
|
+
{
|
|
661
|
+
InstancePtr instance = fixedReference->getInstance();
|
|
662
|
+
ConnectionIPtr connection = fixedReference->fixedConnection();
|
|
663
|
+
connection->getThreadPool()->execute(
|
|
664
|
+
[response = std::move(response), connection, instance = std::move(instance)]()
|
|
665
|
+
{
|
|
666
|
+
try
|
|
667
|
+
{
|
|
668
|
+
response(connection);
|
|
669
|
+
}
|
|
670
|
+
catch (...)
|
|
671
|
+
{
|
|
672
|
+
if (instance->initializationData().properties->getIcePropertyAsInt("Ice.Warn.AMICallback") > 0)
|
|
673
|
+
{
|
|
674
|
+
Warning out(instance->initializationData().logger);
|
|
675
|
+
try
|
|
676
|
+
{
|
|
677
|
+
throw;
|
|
678
|
+
}
|
|
679
|
+
catch (const Ice::Exception& e)
|
|
680
|
+
{
|
|
681
|
+
out << "Ice::Exception raised by response callback:\n" << e;
|
|
682
|
+
}
|
|
683
|
+
catch (const std::exception& e)
|
|
684
|
+
{
|
|
685
|
+
out << "std::exception raised by response callback:\n" << e.what();
|
|
686
|
+
}
|
|
687
|
+
catch (...)
|
|
688
|
+
{
|
|
689
|
+
out << "unknown exception raised by response callback";
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
connection);
|
|
695
|
+
}
|
|
696
|
+
return [] {};
|
|
697
|
+
}
|
|
698
|
+
else
|
|
699
|
+
{
|
|
700
|
+
using LambdaOutgoing = ProxyGetConnectionLambda;
|
|
701
|
+
auto outAsync = std::make_shared<LambdaOutgoing>(*this, std::move(response), std::move(ex), std::move(sent));
|
|
702
|
+
_iceI_getConnection(outAsync);
|
|
703
|
+
return [outAsync]() { outAsync->cancel(); };
|
|
704
|
+
}
|
|
618
705
|
}
|
|
619
706
|
|
|
620
707
|
std::future<Ice::ConnectionPtr>
|
|
621
708
|
Ice::ObjectPrx::ice_getConnectionAsync() const
|
|
622
709
|
{
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
710
|
+
// A fixed proxy is bound to a single connection: return this connection as is, whatever its state.
|
|
711
|
+
if (auto fixedReference = dynamic_pointer_cast<FixedReference>(_reference))
|
|
712
|
+
{
|
|
713
|
+
promise<Ice::ConnectionPtr> p;
|
|
714
|
+
p.set_value(fixedReference->fixedConnection());
|
|
715
|
+
return p.get_future();
|
|
716
|
+
}
|
|
717
|
+
else
|
|
718
|
+
{
|
|
719
|
+
auto outAsync = std::make_shared<ProxyGetConnectionPromise>(*this);
|
|
720
|
+
_iceI_getConnection(outAsync);
|
|
721
|
+
return outAsync->getFuture();
|
|
722
|
+
}
|
|
626
723
|
}
|
|
627
724
|
|
|
628
725
|
void
|
|
@@ -53,8 +53,8 @@ Ice::proxyIdentityAndFacetLess(const optional<ObjectPrx>& lhs, const optional<Ob
|
|
|
53
53
|
{
|
|
54
54
|
if (lhs && rhs)
|
|
55
55
|
{
|
|
56
|
-
Identity lhsIdentity = lhs->ice_getIdentity();
|
|
57
|
-
Identity rhsIdentity = rhs->ice_getIdentity();
|
|
56
|
+
const Identity& lhsIdentity = lhs->ice_getIdentity();
|
|
57
|
+
const Identity& rhsIdentity = rhs->ice_getIdentity();
|
|
58
58
|
|
|
59
59
|
if (lhsIdentity < rhsIdentity)
|
|
60
60
|
{
|
|
@@ -65,8 +65,8 @@ Ice::proxyIdentityAndFacetLess(const optional<ObjectPrx>& lhs, const optional<Ob
|
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
string lhsFacet = lhs->ice_getFacet();
|
|
69
|
-
string rhsFacet = rhs->ice_getFacet();
|
|
68
|
+
const string& lhsFacet = lhs->ice_getFacet();
|
|
69
|
+
const string& rhsFacet = rhs->ice_getFacet();
|
|
70
70
|
|
|
71
71
|
return lhsFacet < rhsFacet;
|
|
72
72
|
}
|