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
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
# include <csignal>
|
|
67
67
|
# include <pwd.h>
|
|
68
68
|
# include <sys/types.h>
|
|
69
|
-
# include <syslog.h>
|
|
70
69
|
#endif
|
|
71
70
|
|
|
72
71
|
#if defined(__linux__) || defined(__GLIBC__)
|
|
@@ -87,7 +86,6 @@ namespace
|
|
|
87
86
|
struct sigaction oldAction;
|
|
88
87
|
#endif
|
|
89
88
|
bool printProcessIdDone = false;
|
|
90
|
-
string identForOpenlog;
|
|
91
89
|
|
|
92
90
|
//
|
|
93
91
|
// Should be called with staticMutex locked
|
|
@@ -617,7 +615,7 @@ IceInternal::Instance::createAdmin(const ObjectAdapterPtr& adminAdapter, const I
|
|
|
617
615
|
catch (...)
|
|
618
616
|
{
|
|
619
617
|
//
|
|
620
|
-
// We clean it up, even
|
|
618
|
+
// We clean it up, even though this error is not recoverable
|
|
621
619
|
// (can't call again createAdmin after fixing the problem since all the facets
|
|
622
620
|
// in the adapter are lost)
|
|
623
621
|
//
|
|
@@ -676,7 +674,7 @@ IceInternal::Instance::getAdmin()
|
|
|
676
674
|
catch (...)
|
|
677
675
|
{
|
|
678
676
|
//
|
|
679
|
-
// We clean it up, even
|
|
677
|
+
// We clean it up, even though this error is not recoverable
|
|
680
678
|
// (can't call again createAdmin after fixing the problem since all the facets
|
|
681
679
|
// in the adapter are lost)
|
|
682
680
|
//
|
|
@@ -741,7 +739,7 @@ IceInternal::Instance::setServerProcessProxy(const ObjectAdapterPtr& adminAdapte
|
|
|
741
739
|
if (_traceLevels->location >= 1)
|
|
742
740
|
{
|
|
743
741
|
Trace out(_initData.logger, _traceLevels->locationCat);
|
|
744
|
-
out << "
|
|
742
|
+
out << "could not register server '" + serverId + "' with the locator registry:\n";
|
|
745
743
|
out << "the server is not known to the locator registry";
|
|
746
744
|
}
|
|
747
745
|
|
|
@@ -755,7 +753,7 @@ IceInternal::Instance::setServerProcessProxy(const ObjectAdapterPtr& adminAdapte
|
|
|
755
753
|
if (_traceLevels->location >= 1)
|
|
756
754
|
{
|
|
757
755
|
Trace out(_initData.logger, _traceLevels->locationCat);
|
|
758
|
-
out << "
|
|
756
|
+
out << "could not register server '" + serverId + "' with the locator registry:\n" << ex;
|
|
759
757
|
}
|
|
760
758
|
throw;
|
|
761
759
|
}
|
|
@@ -919,12 +917,6 @@ IceInternal::Instance::setLogger(const Ice::LoggerPtr& logger)
|
|
|
919
917
|
_initData.logger = logger;
|
|
920
918
|
}
|
|
921
919
|
|
|
922
|
-
void
|
|
923
|
-
IceInternal::Instance::setThreadHook(function<void()> threadStart, function<void()> threadStop)
|
|
924
|
-
{
|
|
925
|
-
_initData.threadStart = std::move(threadStart);
|
|
926
|
-
_initData.threadStop = std::move(threadStop);
|
|
927
|
-
}
|
|
928
920
|
namespace
|
|
929
921
|
{
|
|
930
922
|
bool logStdErrConvert = true;
|
|
@@ -1026,15 +1018,6 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
|
1026
1018
|
sigemptyset(&action.sa_mask);
|
|
1027
1019
|
action.sa_flags = 0;
|
|
1028
1020
|
sigaction(SIGPIPE, &action, &oldAction);
|
|
1029
|
-
if (_initData.properties->getIcePropertyAsInt("Ice.UseSyslog") > 0)
|
|
1030
|
-
{
|
|
1031
|
-
identForOpenlog = programName;
|
|
1032
|
-
if (identForOpenlog.empty())
|
|
1033
|
-
{
|
|
1034
|
-
identForOpenlog = "<Unknown Ice Program>";
|
|
1035
|
-
}
|
|
1036
|
-
openlog(identForOpenlog.c_str(), LOG_PID, LOG_USER);
|
|
1037
|
-
}
|
|
1038
1021
|
#else
|
|
1039
1022
|
logStdErrConvert = _initData.properties->getIcePropertyAsInt("Ice.LogStdErr.Convert") > 0 &&
|
|
1040
1023
|
_initData.properties->getIceProperty("Ice.StdErr").empty();
|
|
@@ -1050,7 +1033,7 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
|
1050
1033
|
{
|
|
1051
1034
|
if (!logfile.empty())
|
|
1052
1035
|
{
|
|
1053
|
-
throw InitializationException(__FILE__, __LINE__, "
|
|
1036
|
+
throw InitializationException(__FILE__, __LINE__, "cannot enable both syslog and file logger");
|
|
1054
1037
|
}
|
|
1055
1038
|
|
|
1056
1039
|
_initData.logger =
|
|
@@ -1185,6 +1168,10 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
|
1185
1168
|
|
|
1186
1169
|
const_cast<bool&>(_acceptClassCycles) = _initData.properties->getIcePropertyAsInt("Ice.AcceptClassCycles") > 0;
|
|
1187
1170
|
|
|
1171
|
+
// Read here (not in the noexcept destroy) so an invalid value is reported when the communicator is created.
|
|
1172
|
+
const_cast<bool&>(_warnUnusedProperties) =
|
|
1173
|
+
_initData.properties->getIcePropertyAsInt("Ice.Warn.UnusedProperties") > 0;
|
|
1174
|
+
|
|
1188
1175
|
string implicitContextKind = _initData.properties->getIceProperty("Ice.ImplicitContext");
|
|
1189
1176
|
if (implicitContextKind == "Shared")
|
|
1190
1177
|
{
|
|
@@ -1218,7 +1205,7 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
|
1218
1205
|
const bool ipv6 = isIPv6Supported ? (_initData.properties->getIcePropertyAsInt("Ice.IPv6") > 0) : false;
|
|
1219
1206
|
if (!ipv4 && !ipv6)
|
|
1220
1207
|
{
|
|
1221
|
-
throw InitializationException(__FILE__, __LINE__, "
|
|
1208
|
+
throw InitializationException(__FILE__, __LINE__, "cannot disable both IPv4 and IPv6 support");
|
|
1222
1209
|
}
|
|
1223
1210
|
else if (ipv4 && ipv6)
|
|
1224
1211
|
{
|
|
@@ -1258,20 +1245,26 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
|
1258
1245
|
istringstream value(retryValue);
|
|
1259
1246
|
|
|
1260
1247
|
int v;
|
|
1261
|
-
|
|
1262
|
-
{
|
|
1263
|
-
v = 0;
|
|
1264
|
-
}
|
|
1248
|
+
bool parsed = static_cast<bool>(value >> v) && value.eof();
|
|
1265
1249
|
|
|
1266
1250
|
//
|
|
1267
1251
|
// If -1 is the first value, no retry and wait intervals.
|
|
1268
1252
|
//
|
|
1269
|
-
if (v == -1 && _retryIntervals.empty())
|
|
1253
|
+
if (parsed && v == -1 && _retryIntervals.empty())
|
|
1270
1254
|
{
|
|
1271
1255
|
break;
|
|
1272
1256
|
}
|
|
1273
1257
|
|
|
1274
|
-
|
|
1258
|
+
// Any value that is not a non-negative integer (or the leading -1 handled above) is invalid and
|
|
1259
|
+
// treated as 0.
|
|
1260
|
+
if (!parsed || v < 0)
|
|
1261
|
+
{
|
|
1262
|
+
Warning out(_initData.logger);
|
|
1263
|
+
out << "invalid value '" << retryValue << "' in property Ice.RetryIntervals, assuming 0";
|
|
1264
|
+
v = 0;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
_retryIntervals.push_back(v);
|
|
1275
1268
|
}
|
|
1276
1269
|
}
|
|
1277
1270
|
|
|
@@ -1373,12 +1366,6 @@ IceInternal::Instance::~Instance()
|
|
|
1373
1366
|
|
|
1374
1367
|
#ifndef _WIN32
|
|
1375
1368
|
sigaction(SIGPIPE, &oldAction, nullptr);
|
|
1376
|
-
|
|
1377
|
-
if (!identForOpenlog.empty())
|
|
1378
|
-
{
|
|
1379
|
-
closelog();
|
|
1380
|
-
identForOpenlog.clear();
|
|
1381
|
-
}
|
|
1382
1369
|
#endif
|
|
1383
1370
|
}
|
|
1384
1371
|
}
|
|
@@ -1733,7 +1720,7 @@ IceInternal::Instance::destroy() noexcept
|
|
|
1733
1720
|
_locatorManager->destroy();
|
|
1734
1721
|
}
|
|
1735
1722
|
|
|
1736
|
-
if (
|
|
1723
|
+
if (_warnUnusedProperties)
|
|
1737
1724
|
{
|
|
1738
1725
|
set<string> unusedProperties = _initData.properties.get()->getUnusedProperties();
|
|
1739
1726
|
if (unusedProperties.size() != 0)
|
|
@@ -1819,10 +1806,25 @@ IceInternal::Instance::updateConnectionObservers()
|
|
|
1819
1806
|
{
|
|
1820
1807
|
try
|
|
1821
1808
|
{
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1809
|
+
// This updater can run concurrently with destroy(). Copy the subsystem pointers under the mutex, and bail out
|
|
1810
|
+
// once destruction has started: destroy() tears down these subsystems (while _state is StateDestroyInProgress)
|
|
1811
|
+
// before nulling them (when it sets _state to StateDestroyed).
|
|
1812
|
+
OutgoingConnectionFactoryPtr outgoingConnectionFactory;
|
|
1813
|
+
ObjectAdapterFactoryPtr objectAdapterFactory;
|
|
1814
|
+
{
|
|
1815
|
+
lock_guard lock(_mutex);
|
|
1816
|
+
if (_state >= StateDestroyInProgress)
|
|
1817
|
+
{
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
outgoingConnectionFactory = _outgoingConnectionFactory;
|
|
1821
|
+
objectAdapterFactory = _objectAdapterFactory;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
assert(outgoingConnectionFactory);
|
|
1825
|
+
outgoingConnectionFactory->updateConnectionObservers();
|
|
1826
|
+
assert(objectAdapterFactory);
|
|
1827
|
+
objectAdapterFactory->updateObservers(&ObjectAdapterI::updateConnectionObservers);
|
|
1826
1828
|
}
|
|
1827
1829
|
catch (const Ice::CommunicatorDestroyedException&)
|
|
1828
1830
|
{
|
|
@@ -1834,23 +1836,44 @@ IceInternal::Instance::updateThreadObservers()
|
|
|
1834
1836
|
{
|
|
1835
1837
|
try
|
|
1836
1838
|
{
|
|
1837
|
-
|
|
1839
|
+
// This updater can run concurrently with destroy(). Copy the subsystem pointers under the mutex, and bail out
|
|
1840
|
+
// once destruction has started: destroy() tears down these subsystems (while _state is StateDestroyInProgress)
|
|
1841
|
+
// before nulling them (when it sets _state to StateDestroyed).
|
|
1842
|
+
ThreadPoolPtr clientThreadPool;
|
|
1843
|
+
ThreadPoolPtr serverThreadPool;
|
|
1844
|
+
ObjectAdapterFactoryPtr objectAdapterFactory;
|
|
1845
|
+
EndpointHostResolverPtr endpointHostResolver;
|
|
1846
|
+
ThreadObserverTimerPtr timer;
|
|
1847
|
+
{
|
|
1848
|
+
lock_guard lock(_mutex);
|
|
1849
|
+
if (_state >= StateDestroyInProgress)
|
|
1850
|
+
{
|
|
1851
|
+
return;
|
|
1852
|
+
}
|
|
1853
|
+
clientThreadPool = _clientThreadPool;
|
|
1854
|
+
serverThreadPool = _serverThreadPool;
|
|
1855
|
+
objectAdapterFactory = _objectAdapterFactory;
|
|
1856
|
+
endpointHostResolver = _endpointHostResolver;
|
|
1857
|
+
timer = _timer;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
if (clientThreadPool)
|
|
1838
1861
|
{
|
|
1839
|
-
|
|
1862
|
+
clientThreadPool->updateObservers();
|
|
1840
1863
|
}
|
|
1841
|
-
if (
|
|
1864
|
+
if (serverThreadPool)
|
|
1842
1865
|
{
|
|
1843
|
-
|
|
1866
|
+
serverThreadPool->updateObservers();
|
|
1844
1867
|
}
|
|
1845
|
-
assert(
|
|
1846
|
-
|
|
1847
|
-
if (
|
|
1868
|
+
assert(objectAdapterFactory);
|
|
1869
|
+
objectAdapterFactory->updateObservers(&ObjectAdapterI::updateThreadObservers);
|
|
1870
|
+
if (endpointHostResolver)
|
|
1848
1871
|
{
|
|
1849
|
-
|
|
1872
|
+
endpointHostResolver->updateObserver();
|
|
1850
1873
|
}
|
|
1851
|
-
if (
|
|
1874
|
+
if (timer)
|
|
1852
1875
|
{
|
|
1853
|
-
|
|
1876
|
+
timer->updateObserver(_initData.observer);
|
|
1854
1877
|
}
|
|
1855
1878
|
}
|
|
1856
1879
|
catch (const Ice::CommunicatorDestroyedException&)
|
|
@@ -40,9 +40,6 @@ namespace IceInternal
|
|
|
40
40
|
class ThreadObserverTimer;
|
|
41
41
|
using ThreadObserverTimerPtr = std::shared_ptr<ThreadObserverTimer>;
|
|
42
42
|
|
|
43
|
-
class MetricsAdminI;
|
|
44
|
-
using MetricsAdminIPtr = std::shared_ptr<MetricsAdminI>;
|
|
45
|
-
|
|
46
43
|
/// Structure to track warnings for attempts to set socket buffer sizes.
|
|
47
44
|
struct BufSizeWarnInfo
|
|
48
45
|
{
|
|
@@ -112,7 +109,6 @@ namespace IceInternal
|
|
|
112
109
|
void setDefaultRouter(const std::optional<Ice::RouterPrx>&);
|
|
113
110
|
|
|
114
111
|
void setLogger(const Ice::LoggerPtr&);
|
|
115
|
-
void setThreadHook(std::function<void()>, std::function<void()>);
|
|
116
112
|
|
|
117
113
|
[[nodiscard]] const Ice::StringConverterPtr& getStringConverter() const { return _stringConverter; }
|
|
118
114
|
[[nodiscard]] const Ice::WstringConverterPtr& getWstringConverter() const { return _wstringConverter; }
|
|
@@ -158,6 +154,7 @@ namespace IceInternal
|
|
|
158
154
|
const std::int32_t _classGraphDepthMax{0}; // Immutable, not reset by destroy().
|
|
159
155
|
const Ice::ToStringMode _toStringMode{Ice::ToStringMode::Unicode}; // Immutable, not reset by destroy().
|
|
160
156
|
const bool _acceptClassCycles{false}; // Immutable, not reset by destroy().
|
|
157
|
+
const bool _warnUnusedProperties{false}; // Immutable, not reset by destroy().
|
|
161
158
|
Ice::ConnectionOptions _clientConnectionOptions;
|
|
162
159
|
Ice::ConnectionOptions _serverConnectionOptions;
|
|
163
160
|
RouterManagerPtr _routerManager;
|
|
@@ -177,7 +174,6 @@ namespace IceInternal
|
|
|
177
174
|
ThreadObserverTimerPtr _timer;
|
|
178
175
|
EndpointFactoryManagerPtr _endpointFactoryManager;
|
|
179
176
|
Ice::PluginManagerPtr _pluginManager;
|
|
180
|
-
const Ice::ImplicitContextPtr _implicitContext;
|
|
181
177
|
Ice::StringConverterPtr _stringConverter;
|
|
182
178
|
Ice::WstringConverterPtr _wstringConverter;
|
|
183
179
|
bool _adminEnabled{false};
|
|
@@ -185,7 +181,6 @@ namespace IceInternal
|
|
|
185
181
|
Ice::FacetMap _adminFacets;
|
|
186
182
|
Ice::Identity _adminIdentity;
|
|
187
183
|
std::set<std::string, std::less<>> _adminFacetFilter;
|
|
188
|
-
IceInternal::MetricsAdminIPtr _metricsAdmin;
|
|
189
184
|
std::map<std::int16_t, BufSizeWarnInfo> _setBufSizeWarn;
|
|
190
185
|
std::mutex _setBufSizeWarnMutex;
|
|
191
186
|
mutable std::recursive_mutex _mutex;
|
|
@@ -320,7 +320,7 @@ namespace
|
|
|
320
320
|
{
|
|
321
321
|
if (error == 0)
|
|
322
322
|
{
|
|
323
|
-
return "
|
|
323
|
+
return "could not open file";
|
|
324
324
|
}
|
|
325
325
|
else
|
|
326
326
|
{
|
|
@@ -570,6 +570,12 @@ Ice::TwowayOnlyException::ice_id() const noexcept
|
|
|
570
570
|
return "::Ice::TwowayOnlyException";
|
|
571
571
|
}
|
|
572
572
|
|
|
573
|
+
const char*
|
|
574
|
+
Ice::OnewayOnlyException::ice_id() const noexcept
|
|
575
|
+
{
|
|
576
|
+
return "::Ice::OnewayOnlyException";
|
|
577
|
+
}
|
|
578
|
+
|
|
573
579
|
const char*
|
|
574
580
|
Ice::PropertyException::ice_id() const noexcept
|
|
575
581
|
{
|
|
@@ -661,7 +661,7 @@ IceInternal::LocatorInfo::getEndpointsException(const ReferencePtr& ref, std::ex
|
|
|
661
661
|
if (ref->getInstance()->traceLevels()->location >= 1)
|
|
662
662
|
{
|
|
663
663
|
Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat);
|
|
664
|
-
out << "
|
|
664
|
+
out << "could not contact the locator to retrieve endpoints\n";
|
|
665
665
|
if (ref->getAdapterId().empty())
|
|
666
666
|
{
|
|
667
667
|
out << "well-known proxy = " << ref->toString() << "\n";
|
|
@@ -810,7 +810,7 @@ IceInternal::LocatorInfo::finishRequest(
|
|
|
810
810
|
{
|
|
811
811
|
//
|
|
812
812
|
// Remove the cached references of well-known objects for which we tried
|
|
813
|
-
// to
|
|
813
|
+
// to resolve the endpoints if these endpoints are empty.
|
|
814
814
|
//
|
|
815
815
|
for (const auto& wellKnownRef : wellKnownRefs)
|
|
816
816
|
{
|
|
@@ -77,11 +77,6 @@ namespace
|
|
|
77
77
|
|
|
78
78
|
using RemoteLoggerMap = map<RemoteLoggerPrx, Filters, ObjectIdentityCompare>;
|
|
79
79
|
|
|
80
|
-
struct GetRemoteLoggerMapKey
|
|
81
|
-
{
|
|
82
|
-
RemoteLoggerMap::key_type operator()(const RemoteLoggerMap::value_type& val) { return val.first; }
|
|
83
|
-
};
|
|
84
|
-
|
|
85
80
|
RemoteLoggerMap _remoteLoggerMap;
|
|
86
81
|
CommunicatorPtr _sendLogCommunicator;
|
|
87
82
|
bool _destroyed{false};
|
|
@@ -515,21 +510,21 @@ namespace
|
|
|
515
510
|
}
|
|
516
511
|
}
|
|
517
512
|
}
|
|
513
|
+
}
|
|
518
514
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
515
|
+
//
|
|
516
|
+
// Queue updated, now find which remote loggers want this message
|
|
517
|
+
//
|
|
518
|
+
for (const auto& q : _remoteLoggerMap)
|
|
519
|
+
{
|
|
520
|
+
const Filters& filters = q.second;
|
|
525
521
|
|
|
526
|
-
|
|
522
|
+
if (filters.messageTypes.empty() || filters.messageTypes.count(logMessage.type) != 0)
|
|
523
|
+
{
|
|
524
|
+
if (logMessage.type != LogMessageType::TraceMessage || filters.traceCategories.empty() ||
|
|
525
|
+
filters.traceCategories.count(logMessage.traceCategory) != 0)
|
|
527
526
|
{
|
|
528
|
-
|
|
529
|
-
filters.traceCategories.count(logMessage.traceCategory) != 0)
|
|
530
|
-
{
|
|
531
|
-
remoteLoggers.push_back(q.first);
|
|
532
|
-
}
|
|
527
|
+
remoteLoggers.push_back(q.first);
|
|
533
528
|
}
|
|
534
529
|
}
|
|
535
530
|
}
|
|
@@ -671,10 +666,10 @@ namespace
|
|
|
671
666
|
{
|
|
672
667
|
lock_guard lock(_mutex);
|
|
673
668
|
|
|
669
|
+
_detached.store(true);
|
|
674
670
|
if (_sendLogThread.joinable())
|
|
675
671
|
{
|
|
676
672
|
sendLogThread = std::move(_sendLogThread);
|
|
677
|
-
_detached.store(true);
|
|
678
673
|
_conditionVariable.notify_all();
|
|
679
674
|
}
|
|
680
675
|
}
|
|
@@ -179,7 +179,7 @@ Ice::LoggerI::write(const string& message, bool indent)
|
|
|
179
179
|
_nextRetry = chrono::steady_clock::now() + retryTimeout;
|
|
180
180
|
|
|
181
181
|
//
|
|
182
|
-
// We temporarily set the maximum size to 0 to ensure there
|
|
182
|
+
// We temporarily set the maximum size to 0 to ensure there aren't more rename attempts
|
|
183
183
|
// in the nested error call.
|
|
184
184
|
//
|
|
185
185
|
size_t sizeMax = _sizeMax;
|
|
@@ -36,8 +36,8 @@ namespace Ice
|
|
|
36
36
|
std::size_t _sizeMax;
|
|
37
37
|
|
|
38
38
|
//
|
|
39
|
-
// In case of a log file rename failure
|
|
40
|
-
//
|
|
39
|
+
// In case of a log file rename failure, set to the time point after which
|
|
40
|
+
// the rename can be attempted again. Otherwise, set to the epoch (zero).
|
|
41
41
|
//
|
|
42
42
|
std::chrono::steady_clock::time_point _nextRetry;
|
|
43
43
|
};
|
|
@@ -443,7 +443,12 @@ namespace IceInternal
|
|
|
443
443
|
// If there's still no room, remove the oldest entry (at the front).
|
|
444
444
|
if (static_cast<int>(_detachedQueue.size()) == _retain)
|
|
445
445
|
{
|
|
446
|
-
|
|
446
|
+
EntryTPtr front = _detachedQueue.front();
|
|
447
|
+
// Reset the evicted entry's position so a surviving EntryTPtr doesn't keep an iterator into the erased
|
|
448
|
+
// list node.
|
|
449
|
+
front->_detachedPos = _detachedQueue.end();
|
|
450
|
+
|
|
451
|
+
_objects.erase(front->_object->id);
|
|
447
452
|
_detachedQueue.pop_front();
|
|
448
453
|
}
|
|
449
454
|
|
|
@@ -493,30 +493,34 @@ namespace IceMX
|
|
|
493
493
|
return getObserver(helper);
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
std::lock_guard lock(_mutex);
|
|
497
|
-
if (!_metrics)
|
|
498
496
|
{
|
|
499
|
-
|
|
500
|
-
|
|
497
|
+
std::lock_guard lock(_mutex);
|
|
498
|
+
if (!_metrics)
|
|
499
|
+
{
|
|
500
|
+
return nullptr;
|
|
501
|
+
}
|
|
501
502
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
{
|
|
505
|
-
typename ObserverImplType::EntryPtrType entry = map->getMatching(helper, old->getEntry(map.get()));
|
|
506
|
-
if (entry)
|
|
503
|
+
typename ObserverImplType::EntrySeqType metricsObjects;
|
|
504
|
+
for (const auto& map : _maps)
|
|
507
505
|
{
|
|
508
|
-
|
|
506
|
+
typename ObserverImplType::EntryPtrType entry = map->getMatching(helper, old->getEntry(map.get()));
|
|
507
|
+
if (entry)
|
|
508
|
+
{
|
|
509
|
+
metricsObjects.push_back(entry);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (!metricsObjects.empty())
|
|
513
|
+
{
|
|
514
|
+
ObserverImplPtrType obsv = std::make_shared<ObserverImplType>();
|
|
515
|
+
obsv->init(helper, metricsObjects, old.get());
|
|
516
|
+
return obsv;
|
|
509
517
|
}
|
|
510
|
-
}
|
|
511
|
-
if (metricsObjects.empty())
|
|
512
|
-
{
|
|
513
|
-
old->detach();
|
|
514
|
-
return nullptr;
|
|
515
518
|
}
|
|
516
519
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
+
// No map matched the updated observer: detach the old observer outside the factory mutex, since
|
|
521
|
+
// detach() can call into a user-supplied instrumentation delegate.
|
|
522
|
+
old->detach();
|
|
523
|
+
return nullptr;
|
|
520
524
|
}
|
|
521
525
|
|
|
522
526
|
template<typename SubMapMetricsType>
|
|
@@ -38,7 +38,7 @@ Ice::NativePropertiesAdmin::getPropertiesForPrefix(string prefix, const Current&
|
|
|
38
38
|
void
|
|
39
39
|
Ice::NativePropertiesAdmin::setProperties(PropertyDict props, const Current&)
|
|
40
40
|
{
|
|
41
|
-
|
|
41
|
+
unique_lock lock{_mutex};
|
|
42
42
|
|
|
43
43
|
PropertyDict old = _properties->getPropertiesForPrefix("");
|
|
44
44
|
PropertyDict::const_iterator p;
|
|
@@ -157,8 +157,11 @@ Ice::NativePropertiesAdmin::setProperties(PropertyDict props, const Current&)
|
|
|
157
157
|
changes.insert(changed.begin(), changed.end());
|
|
158
158
|
changes.insert(removed.begin(), removed.end());
|
|
159
159
|
|
|
160
|
-
// Copy callbacks
|
|
160
|
+
// Copy the callbacks and release the lock before invoking them. This allows the callbacks to update the
|
|
161
|
+
// callbacks, and avoids a lock-order inversion: a callback may acquire an application lock, while another
|
|
162
|
+
// thread may call into the admin (e.g. add/removeUpdateCallback) while holding that same lock.
|
|
161
163
|
auto callbacks = _updateCallbacks;
|
|
164
|
+
lock.unlock();
|
|
162
165
|
for (const auto& cb : callbacks)
|
|
163
166
|
{
|
|
164
167
|
cb(changes);
|