zeroc-ice 3.6.2 → 3.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/slice2rb +0 -0
- data/ext/Slice.cpp +32 -39
- data/ext/ice/cpp/include/Ice/BasicStream.h +15 -4
- data/ext/ice/cpp/include/Ice/BuiltinSequences.h +2 -2
- data/ext/ice/cpp/include/Ice/Communicator.h +2 -2
- data/ext/ice/cpp/include/Ice/CommunicatorF.h +2 -2
- data/ext/ice/cpp/include/Ice/Connection.h +2 -2
- data/ext/ice/cpp/include/Ice/ConnectionF.h +2 -2
- data/ext/ice/cpp/include/Ice/Current.h +2 -2
- data/ext/ice/cpp/include/Ice/Endpoint.h +2 -2
- data/ext/ice/cpp/include/Ice/EndpointF.h +2 -2
- data/ext/ice/cpp/include/Ice/EndpointTypes.h +2 -2
- data/ext/ice/cpp/include/Ice/FacetMap.h +2 -2
- data/ext/ice/cpp/include/Ice/Identity.h +2 -2
- data/ext/ice/cpp/include/Ice/ImplicitContext.h +2 -2
- data/ext/ice/cpp/include/Ice/ImplicitContextF.h +2 -2
- data/ext/ice/cpp/include/Ice/Instrumentation.h +2 -2
- data/ext/ice/cpp/include/Ice/InstrumentationF.h +2 -2
- data/ext/ice/cpp/include/Ice/LocalException.h +2 -2
- data/ext/ice/cpp/include/Ice/Locator.h +2 -2
- data/ext/ice/cpp/include/Ice/LocatorF.h +2 -2
- data/ext/ice/cpp/include/Ice/Logger.h +2 -2
- data/ext/ice/cpp/include/Ice/LoggerF.h +2 -2
- data/ext/ice/cpp/include/Ice/Metrics.h +2 -2
- data/ext/ice/cpp/include/Ice/ObjectAdapter.h +2 -2
- data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +2 -2
- data/ext/ice/cpp/include/Ice/ObjectFactory.h +2 -2
- data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +2 -2
- data/ext/ice/cpp/include/Ice/Plugin.h +2 -2
- data/ext/ice/cpp/include/Ice/PluginF.h +2 -2
- data/ext/ice/cpp/include/Ice/Process.h +2 -2
- data/ext/ice/cpp/include/Ice/ProcessF.h +2 -2
- data/ext/ice/cpp/include/Ice/Properties.h +2 -2
- data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +2 -2
- data/ext/ice/cpp/include/Ice/PropertiesF.h +2 -2
- data/ext/ice/cpp/include/Ice/RemoteLogger.h +2 -2
- data/ext/ice/cpp/include/Ice/Router.h +2 -2
- data/ext/ice/cpp/include/Ice/RouterF.h +2 -2
- data/ext/ice/cpp/include/Ice/ServantLocator.h +2 -2
- data/ext/ice/cpp/include/Ice/ServantLocatorF.h +2 -2
- data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +2 -2
- data/ext/ice/cpp/include/Ice/SlicedData.h +6 -0
- data/ext/ice/cpp/include/Ice/Version.h +2 -2
- data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +2 -2
- data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +2 -2
- data/ext/ice/cpp/include/IceUtil/Config.h +86 -26
- data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +1 -1
- data/ext/ice/cpp/include/IceUtil/Time.h +3 -2
- data/ext/ice/cpp/include/Slice/PythonUtil.h +1 -1
- data/ext/ice/cpp/include/Slice/RubyUtil.h +1 -1
- data/ext/ice/cpp/include/Slice/Util.h +5 -0
- data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Communicator.cpp +2 -2
- data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Connection.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ConnectionF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +57 -42
- data/ext/ice/cpp/src/Ice/ConnectionFactory.h +2 -0
- data/ext/ice/cpp/src/Ice/Current.cpp +2 -2
- data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +9 -5
- data/ext/ice/cpp/src/Ice/Endpoint.cpp +2 -2
- data/ext/ice/cpp/src/Ice/EndpointF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +2 -2
- data/ext/ice/cpp/src/Ice/FacetMap.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Identity.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Incoming.cpp +11 -4
- data/ext/ice/cpp/src/Ice/Instance.cpp +4 -2
- data/ext/ice/cpp/src/Ice/Instrumentation.cpp +2 -2
- data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1 -3
- data/ext/ice/cpp/src/Ice/LocalException.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Locator.cpp +2 -2
- data/ext/ice/cpp/src/Ice/LocatorF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Logger.cpp +2 -2
- data/ext/ice/cpp/src/Ice/LoggerF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/LoggerI.cpp +94 -5
- data/ext/ice/cpp/src/Ice/LoggerI.h +7 -1
- data/ext/ice/cpp/src/Ice/Metrics.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Network.cpp +23 -7
- data/ext/ice/cpp/src/Ice/Network.h +1 -1
- data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Plugin.cpp +2 -2
- data/ext/ice/cpp/src/Ice/PluginF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +5 -0
- data/ext/ice/cpp/src/Ice/Process.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ProcessF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/Properties.cpp +2 -2
- data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +2 -2
- data/ext/ice/cpp/src/Ice/PropertiesF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/PropertyNames.cpp +4 -3
- data/ext/ice/cpp/src/Ice/PropertyNames.h +1 -1
- data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +2 -2
- data/ext/ice/cpp/src/Ice/RetryQueue.cpp +1 -1
- data/ext/ice/cpp/src/Ice/Router.cpp +2 -2
- data/ext/ice/cpp/src/Ice/RouterF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ServantLocator.cpp +2 -2
- data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +2 -2
- data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +2 -2
- data/ext/ice/cpp/src/Ice/StreamSocket.cpp +19 -3
- data/ext/ice/cpp/src/Ice/Version.cpp +2 -2
- data/ext/ice/cpp/src/Ice/WSConnector.h +2 -2
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +2 -2
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +2 -2
- data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +2 -2
- data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +2 -2
- data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +2 -2
- data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +2 -2
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +54 -39
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +5 -8
- data/ext/ice/cpp/src/IceSSL/Util.cpp +155 -4
- data/ext/ice/cpp/src/IceUtil/Cond.cpp +1 -1
- data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +8 -0
- data/ext/ice/cpp/src/IceUtil/FileUtil.h +18 -5
- data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +5 -5
- data/ext/ice/cpp/src/IceUtil/Time.cpp +25 -17
- data/ext/ice/cpp/src/Slice/JavaUtil.cpp +5 -11
- data/ext/ice/cpp/src/Slice/Preprocessor.cpp +3 -3
- data/ext/ice/cpp/src/Slice/Python.cpp +14 -17
- data/ext/ice/cpp/src/Slice/PythonUtil.cpp +183 -48
- data/ext/ice/cpp/src/Slice/Ruby.cpp +6 -6
- data/ext/ice/cpp/src/Slice/RubyUtil.cpp +0 -10
- data/ext/ice/cpp/src/Slice/Util.cpp +28 -3
- data/ext/ice/mcpp/Makefile +10 -6
- data/ext/ice/mcpp/configed.H +3 -0
- data/ext/ice/mcpp/main.c +2 -2
- data/ext/ice/mcpp/mcpp.gyp +6 -0
- data/ext/ice/mcpp/support.c +1 -1
- data/ext/ice/mcpp/system.H +6 -1
- data/ext/ice/mcpp/system.c +52 -15
- data/ice.gemspec +1 -1
- data/lib/Glacier2/Metrics.rb +1 -1
- data/lib/Glacier2/PermissionsVerifier.rb +1 -1
- data/lib/Glacier2/PermissionsVerifierF.rb +1 -1
- data/lib/Glacier2/Router.rb +1 -1
- data/lib/Glacier2/RouterF.rb +1 -1
- data/lib/Glacier2/SSLInfo.rb +1 -1
- data/lib/Glacier2/Session.rb +1 -1
- data/lib/Ice/BuiltinSequences.rb +1 -1
- data/lib/Ice/Communicator.rb +1 -1
- data/lib/Ice/CommunicatorF.rb +1 -1
- data/lib/Ice/Connection.rb +1 -1
- data/lib/Ice/ConnectionF.rb +1 -1
- data/lib/Ice/Current.rb +1 -1
- data/lib/Ice/Endpoint.rb +1 -1
- data/lib/Ice/EndpointF.rb +1 -1
- data/lib/Ice/EndpointTypes.rb +1 -1
- data/lib/Ice/FacetMap.rb +1 -1
- data/lib/Ice/Identity.rb +1 -1
- data/lib/Ice/ImplicitContext.rb +1 -1
- data/lib/Ice/ImplicitContextF.rb +1 -1
- data/lib/Ice/Instrumentation.rb +1 -1
- data/lib/Ice/InstrumentationF.rb +1 -1
- data/lib/Ice/LocalException.rb +1 -1
- data/lib/Ice/Locator.rb +1 -1
- data/lib/Ice/LocatorF.rb +1 -1
- data/lib/Ice/Logger.rb +1 -1
- data/lib/Ice/LoggerF.rb +1 -1
- data/lib/Ice/Metrics.rb +1 -1
- data/lib/Ice/ObjectAdapterF.rb +1 -1
- data/lib/Ice/ObjectFactory.rb +1 -1
- data/lib/Ice/ObjectFactoryF.rb +1 -1
- data/lib/Ice/Plugin.rb +1 -1
- data/lib/Ice/PluginF.rb +1 -1
- data/lib/Ice/Process.rb +1 -1
- data/lib/Ice/ProcessF.rb +1 -1
- data/lib/Ice/Properties.rb +1 -1
- data/lib/Ice/PropertiesAdmin.rb +1 -1
- data/lib/Ice/PropertiesF.rb +1 -1
- data/lib/Ice/RemoteLogger.rb +1 -1
- data/lib/Ice/Router.rb +1 -1
- data/lib/Ice/RouterF.rb +1 -1
- data/lib/Ice/SliceChecksumDict.rb +1 -1
- data/lib/Ice/Version.rb +1 -1
- data/lib/IceBox/IceBox.rb +1 -1
- data/lib/IceGrid/Admin.rb +1 -1
- data/lib/IceGrid/Descriptor.rb +1 -1
- data/lib/IceGrid/Exception.rb +1 -1
- data/lib/IceGrid/FileParser.rb +1 -1
- data/lib/IceGrid/Locator.rb +1 -1
- data/lib/IceGrid/Observer.rb +1 -1
- data/lib/IceGrid/Query.rb +1 -1
- data/lib/IceGrid/Registry.rb +1 -1
- data/lib/IceGrid/Session.rb +1 -1
- data/lib/IceGrid/UserAccountMapper.rb +1 -1
- data/lib/IcePatch2/FileInfo.rb +1 -1
- data/lib/IcePatch2/FileServer.rb +1 -1
- data/lib/IceStorm/IceStorm.rb +1 -1
- data/lib/IceStorm/Metrics.rb +1 -1
- data/slice/Glacier2/PermissionsVerifier.ice +0 -3
- data/slice/Glacier2/Session.ice +2 -9
- data/slice/Ice/Communicator.ice +3 -3
- data/slice/Ice/ImplicitContext.ice +4 -5
- data/slice/Ice/Instrumentation.ice +26 -26
- data/slice/Ice/LocalException.ice +1 -1
- data/slice/Ice/Locator.ice +5 -3
- data/slice/Ice/Metrics.ice +1 -1
- data/slice/Ice/ObjectFactory.ice +0 -2
- data/slice/Ice/RemoteLogger.ice +32 -32
- data/slice/Ice/Router.ice +3 -0
- data/slice/IceGrid/Session.ice +5 -9
- data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +7 -7
- data/slice/IcePatch2/FileServer.ice +28 -34
- metadata +30 -30
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -33,7 +33,7 @@
|
|
33
33
|
# if ICE_INT_VERSION % 100 > 50
|
34
34
|
# error Beta header file detected
|
35
35
|
# endif
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
37
37
|
# error Ice patch level mismatch!
|
38
38
|
# endif
|
39
39
|
#endif
|
@@ -178,11 +178,18 @@ IceInternal::IncomingBase::__warning(const Exception& ex) const
|
|
178
178
|
|
179
179
|
if(_current.con)
|
180
180
|
{
|
181
|
-
|
182
|
-
Ice::IPConnectionInfoPtr ipConnInfo = Ice::IPConnectionInfoPtr::dynamicCast(connInfo);
|
183
|
-
if(ipConnInfo)
|
181
|
+
try
|
184
182
|
{
|
185
|
-
|
183
|
+
Ice::ConnectionInfoPtr connInfo = _current.con->getInfo();
|
184
|
+
Ice::IPConnectionInfoPtr ipConnInfo = Ice::IPConnectionInfoPtr::dynamicCast(connInfo);
|
185
|
+
if(ipConnInfo)
|
186
|
+
{
|
187
|
+
out << "\nremote host: " << ipConnInfo->remoteAddress << " remote port: " << ipConnInfo->remotePort;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
catch(const Ice::LocalException&)
|
191
|
+
{
|
192
|
+
// Ignore.
|
186
193
|
}
|
187
194
|
}
|
188
195
|
}
|
@@ -61,7 +61,7 @@
|
|
61
61
|
# include <sys/types.h>
|
62
62
|
#endif
|
63
63
|
|
64
|
-
#if defined(__linux) || defined(__sun)
|
64
|
+
#if defined(__linux) || defined(__sun) || defined(_AIX) || defined(__GLIBC__)
|
65
65
|
# include <grp.h> // for initgroups
|
66
66
|
#endif
|
67
67
|
|
@@ -1230,7 +1230,9 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
|
|
1230
1230
|
#endif
|
1231
1231
|
if(!logfile.empty())
|
1232
1232
|
{
|
1233
|
-
_initData.logger =
|
1233
|
+
_initData.logger =
|
1234
|
+
new LoggerI(_initData.properties->getProperty("Ice.ProgramName"), logfile, true, 0,
|
1235
|
+
_initData.properties->getPropertyAsIntWithDefault("Ice.LogFile.SizeMax", 0));
|
1234
1236
|
}
|
1235
1237
|
else
|
1236
1238
|
{
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -34,7 +34,7 @@
|
|
34
34
|
# if ICE_INT_VERSION % 100 > 50
|
35
35
|
# error Beta header file detected
|
36
36
|
# endif
|
37
|
-
# if ICE_INT_VERSION % 100 <
|
37
|
+
# if ICE_INT_VERSION % 100 < 3
|
38
38
|
# error Ice patch level mismatch!
|
39
39
|
# endif
|
40
40
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -33,7 +33,7 @@
|
|
33
33
|
# if ICE_INT_VERSION % 100 > 50
|
34
34
|
# error Beta header file detected
|
35
35
|
# endif
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
37
37
|
# error Ice patch level mismatch!
|
38
38
|
# endif
|
39
39
|
#endif
|
@@ -25,8 +25,6 @@ using namespace IceMX;
|
|
25
25
|
namespace
|
26
26
|
{
|
27
27
|
|
28
|
-
Context emptyCtx;
|
29
|
-
|
30
28
|
int ThreadMetrics::*
|
31
29
|
getThreadStateMetric(ThreadState s)
|
32
30
|
{
|
@@ -354,7 +352,7 @@ public:
|
|
354
352
|
};
|
355
353
|
static Attributes attributes;
|
356
354
|
|
357
|
-
InvocationHelper(const ObjectPrx& proxy, const string& op, const Context& ctx
|
355
|
+
InvocationHelper(const ObjectPrx& proxy, const string& op, const Context& ctx) :
|
358
356
|
_proxy(proxy), _operation(op), _context(ctx)
|
359
357
|
{
|
360
358
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -34,7 +34,7 @@
|
|
34
34
|
# if ICE_INT_VERSION % 100 > 50
|
35
35
|
# error Beta header file detected
|
36
36
|
# endif
|
37
|
-
# if ICE_INT_VERSION % 100 <
|
37
|
+
# if ICE_INT_VERSION % 100 < 3
|
38
38
|
# error Ice patch level mismatch!
|
39
39
|
# endif
|
40
40
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -38,7 +38,7 @@
|
|
38
38
|
# if ICE_INT_VERSION % 100 > 50
|
39
39
|
# error Beta header file detected
|
40
40
|
# endif
|
41
|
-
# if ICE_INT_VERSION % 100 <
|
41
|
+
# if ICE_INT_VERSION % 100 < 3
|
42
42
|
# error Ice patch level mismatch!
|
43
43
|
# endif
|
44
44
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -34,7 +34,7 @@
|
|
34
34
|
# if ICE_INT_VERSION % 100 > 50
|
35
35
|
# error Beta header file detected
|
36
36
|
# endif
|
37
|
-
# if ICE_INT_VERSION % 100 <
|
37
|
+
# if ICE_INT_VERSION % 100 < 3
|
38
38
|
# error Ice patch level mismatch!
|
39
39
|
# endif
|
40
40
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -33,7 +33,7 @@
|
|
33
33
|
# if ICE_INT_VERSION % 100 > 50
|
34
34
|
# error Beta header file detected
|
35
35
|
# endif
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
37
37
|
# error Ice patch level mismatch!
|
38
38
|
# endif
|
39
39
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -33,7 +33,7 @@
|
|
33
33
|
# if ICE_INT_VERSION % 100 > 50
|
34
34
|
# error Beta header file detected
|
35
35
|
# endif
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
37
37
|
# error Ice patch level mismatch!
|
38
38
|
# endif
|
39
39
|
#endif
|
@@ -9,11 +9,11 @@
|
|
9
9
|
|
10
10
|
#include <IceUtil/Time.h>
|
11
11
|
#include <Ice/LoggerI.h>
|
12
|
+
#include <IceUtil/StringUtil.h>
|
12
13
|
#include <IceUtil/Mutex.h>
|
13
14
|
#include <IceUtil/MutexPtrLock.h>
|
14
15
|
|
15
16
|
#ifdef _WIN32
|
16
|
-
# include <IceUtil/StringUtil.h>
|
17
17
|
# include <IceUtil/ScopedArray.h>
|
18
18
|
#endif
|
19
19
|
|
@@ -46,17 +46,24 @@ public:
|
|
46
46
|
|
47
47
|
Init init;
|
48
48
|
|
49
|
+
//
|
50
|
+
// Timeout in milliseconds after which rename will be attempted
|
51
|
+
// in case of failures renaming files. That is set to 5 minutes.
|
52
|
+
//
|
53
|
+
const IceUtil::Time retryTimeout = IceUtil::Time::seconds(5 * 60);
|
54
|
+
|
49
55
|
}
|
50
56
|
|
51
57
|
Ice::LoggerI::LoggerI(const string& prefix, const string& file,
|
52
|
-
bool convert, const IceUtil::StringConverterPtr& converter
|
58
|
+
bool convert, const IceUtil::StringConverterPtr& converter,
|
59
|
+
size_t sizeMax) :
|
53
60
|
_prefix(prefix),
|
54
61
|
_convert(convert),
|
55
|
-
_converter(converter)
|
62
|
+
_converter(converter),
|
63
|
+
_sizeMax(sizeMax)
|
56
64
|
#if defined(_WIN32) && !defined(ICE_OS_WINRT)
|
57
|
-
,
|
65
|
+
,_consoleConverter(new IceUtil::WindowsStringConverter(GetConsoleOutputCP()))
|
58
66
|
#endif
|
59
|
-
|
60
67
|
{
|
61
68
|
if(!prefix.empty())
|
62
69
|
{
|
@@ -71,6 +78,11 @@ Ice::LoggerI::LoggerI(const string& prefix, const string& file,
|
|
71
78
|
{
|
72
79
|
throw InitializationException(__FILE__, __LINE__, "FileLogger: cannot open " + _file);
|
73
80
|
}
|
81
|
+
|
82
|
+
if(_sizeMax > 0)
|
83
|
+
{
|
84
|
+
_out.seekp(0, _out.end);
|
85
|
+
}
|
74
86
|
}
|
75
87
|
}
|
76
88
|
|
@@ -144,6 +156,83 @@ Ice::LoggerI::write(const string& message, bool indent)
|
|
144
156
|
|
145
157
|
if(_out.is_open())
|
146
158
|
{
|
159
|
+
if(_sizeMax > 0)
|
160
|
+
{
|
161
|
+
//
|
162
|
+
// If file size + message size exceeds max size we archive the log file,
|
163
|
+
// but we do not archive empty files or truncate messages.
|
164
|
+
//
|
165
|
+
size_t sz = static_cast<size_t>(_out.tellp());
|
166
|
+
if(sz > 0 && sz + message.size() >= _sizeMax && _nextRetry <= IceUtil::Time::now())
|
167
|
+
{
|
168
|
+
string basename = _file;
|
169
|
+
string ext;
|
170
|
+
|
171
|
+
size_t i = basename.rfind(".");
|
172
|
+
if(i != string::npos && i + 1 < basename.size())
|
173
|
+
{
|
174
|
+
ext = basename.substr(i + 1);
|
175
|
+
basename = basename.substr(0, i);
|
176
|
+
}
|
177
|
+
_out.close();
|
178
|
+
|
179
|
+
int id = 0;
|
180
|
+
string archive;
|
181
|
+
string date = IceUtil::Time::now().toString("%Y%m%d-%H%M%S");
|
182
|
+
while(true)
|
183
|
+
{
|
184
|
+
ostringstream s;
|
185
|
+
s << basename << "-" << date;
|
186
|
+
if(id > 0)
|
187
|
+
{
|
188
|
+
s << "-" << id;
|
189
|
+
}
|
190
|
+
if(!ext.empty())
|
191
|
+
{
|
192
|
+
s << "." << ext;
|
193
|
+
}
|
194
|
+
if(IceUtilInternal::fileExists(s.str()))
|
195
|
+
{
|
196
|
+
id++;
|
197
|
+
continue;
|
198
|
+
}
|
199
|
+
archive = s.str();
|
200
|
+
break;
|
201
|
+
}
|
202
|
+
|
203
|
+
int err = IceUtilInternal::rename(_file, archive);
|
204
|
+
|
205
|
+
_out.open(_file, fstream::out | fstream::app);
|
206
|
+
|
207
|
+
if(err)
|
208
|
+
{
|
209
|
+
_nextRetry = IceUtil::Time::now() + retryTimeout;
|
210
|
+
|
211
|
+
//
|
212
|
+
// We temporarily set the maximum size to 0 to ensure there isn't more rename attempts
|
213
|
+
// in the nested error call.
|
214
|
+
//
|
215
|
+
size_t sizeMax = _sizeMax;
|
216
|
+
_sizeMax = 0;
|
217
|
+
sync.release();
|
218
|
+
error("FileLogger: cannot rename `" + _file + "'\n" + IceUtilInternal::lastErrorToString());
|
219
|
+
sync.acquire();
|
220
|
+
_sizeMax = sizeMax;
|
221
|
+
}
|
222
|
+
else
|
223
|
+
{
|
224
|
+
_nextRetry = IceUtil::Time();
|
225
|
+
}
|
226
|
+
|
227
|
+
if(!_out.is_open())
|
228
|
+
{
|
229
|
+
sync.release();
|
230
|
+
error("FileLogger: cannot open `" + _file + "':\nlog messages will be sent to stderr");
|
231
|
+
write(message, indent);
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
147
236
|
_out << s << endl;
|
148
237
|
}
|
149
238
|
else
|
@@ -22,7 +22,7 @@ class LoggerI : public Logger
|
|
22
22
|
public:
|
23
23
|
|
24
24
|
LoggerI(const std::string&, const std::string&, bool convert = true,
|
25
|
-
const IceUtil::StringConverterPtr& converter = 0);
|
25
|
+
const IceUtil::StringConverterPtr& converter = 0, std::size_t sizeMax = 0);
|
26
26
|
~LoggerI();
|
27
27
|
|
28
28
|
virtual void print(const std::string&);
|
@@ -43,7 +43,13 @@ private:
|
|
43
43
|
IceUtilInternal::ofstream _out;
|
44
44
|
|
45
45
|
std::string _file;
|
46
|
+
std::size_t _sizeMax;
|
46
47
|
|
48
|
+
//
|
49
|
+
// In case of a log file rename failure is set to the time in milliseconds
|
50
|
+
// after which rename could be attempted again. Otherwise is set to zero.
|
51
|
+
//
|
52
|
+
IceUtil::Time _nextRetry;
|
47
53
|
#if defined(_WIN32) && !defined(ICE_OS_WINRT)
|
48
54
|
const IceUtil::StringConverterPtr _consoleConverter;
|
49
55
|
#endif
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// **********************************************************************
|
9
9
|
//
|
10
|
-
// Ice version 3.6.
|
10
|
+
// Ice version 3.6.3
|
11
11
|
//
|
12
12
|
// <auto-generated>
|
13
13
|
//
|
@@ -38,7 +38,7 @@
|
|
38
38
|
# if ICE_INT_VERSION % 100 > 50
|
39
39
|
# error Beta header file detected
|
40
40
|
# endif
|
41
|
-
# if ICE_INT_VERSION % 100 <
|
41
|
+
# if ICE_INT_VERSION % 100 < 3
|
42
42
|
# error Ice patch level mismatch!
|
43
43
|
# endif
|
44
44
|
#endif
|
@@ -1238,7 +1238,17 @@ IceInternal::closeSocket(SOCKET fd)
|
|
1238
1238
|
WSASetLastError(error);
|
1239
1239
|
#else
|
1240
1240
|
int error = errno;
|
1241
|
+
|
1242
|
+
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
1243
|
+
//
|
1244
|
+
// FreeBSD returns ECONNRESET if the underlying object was
|
1245
|
+
// a stream socket that was shut down by the peer before all
|
1246
|
+
// pending data was delivered.
|
1247
|
+
//
|
1248
|
+
if(close(fd) == SOCKET_ERROR && getSocketErrno() != ECONNRESET)
|
1249
|
+
# else
|
1241
1250
|
if(close(fd) == SOCKET_ERROR)
|
1251
|
+
# endif
|
1242
1252
|
{
|
1243
1253
|
SocketException ex(__FILE__, __LINE__);
|
1244
1254
|
ex.error = getSocketErrno();
|
@@ -1263,7 +1273,6 @@ IceInternal::fdToLocalAddress(SOCKET fd, Address& addr)
|
|
1263
1273
|
socklen_t len = static_cast<socklen_t>(sizeof(sockaddr_storage));
|
1264
1274
|
if(getsockname(fd, &addr.sa, &len) == SOCKET_ERROR)
|
1265
1275
|
{
|
1266
|
-
closeSocketNoThrow(fd);
|
1267
1276
|
SocketException ex(__FILE__, __LINE__);
|
1268
1277
|
ex.error = getSocketErrno();
|
1269
1278
|
throw ex;
|
@@ -1297,7 +1306,6 @@ IceInternal::fdToRemoteAddress(SOCKET fd, Address& addr)
|
|
1297
1306
|
}
|
1298
1307
|
else
|
1299
1308
|
{
|
1300
|
-
closeSocketNoThrow(fd);
|
1301
1309
|
SocketException ex(__FILE__, __LINE__);
|
1302
1310
|
ex.error = getSocketErrno();
|
1303
1311
|
throw ex;
|
@@ -2316,12 +2324,20 @@ repeatConnect:
|
|
2316
2324
|
// port as the server).
|
2317
2325
|
//
|
2318
2326
|
Address localAddr;
|
2319
|
-
|
2320
|
-
if(compareAddress(addr, localAddr) == 0)
|
2327
|
+
try
|
2321
2328
|
{
|
2322
|
-
|
2323
|
-
|
2324
|
-
|
2329
|
+
fdToLocalAddress(fd, localAddr);
|
2330
|
+
if(compareAddress(addr, localAddr) == 0)
|
2331
|
+
{
|
2332
|
+
ConnectionRefusedException ex(__FILE__, __LINE__);
|
2333
|
+
ex.error = 0; // No appropriate errno
|
2334
|
+
throw ex;
|
2335
|
+
}
|
2336
|
+
}
|
2337
|
+
catch(const LocalException&)
|
2338
|
+
{
|
2339
|
+
closeSocketNoThrow(fd);
|
2340
|
+
throw;
|
2325
2341
|
}
|
2326
2342
|
#endif
|
2327
2343
|
return true;
|
@@ -45,7 +45,7 @@ typedef int ssize_t;
|
|
45
45
|
|
46
46
|
#if defined(__linux) && !defined(ICE_NO_EPOLL)
|
47
47
|
# define ICE_USE_EPOLL 1
|
48
|
-
#elif (defined(__APPLE__) || defined(__FreeBSD__)) && TARGET_OS_IPHONE == 0 && !defined(ICE_NO_KQUEUE)
|
48
|
+
#elif (defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && TARGET_OS_IPHONE == 0 && !defined(ICE_NO_KQUEUE)
|
49
49
|
# define ICE_USE_KQUEUE 1
|
50
50
|
#elif defined(__APPLE__) && !defined(ICE_NO_CFSTREAM)
|
51
51
|
# define ICE_USE_CFSTREAM 1
|