diff options
author | Jose <jose@zeroc.com> | 2016-06-15 18:06:00 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-06-15 18:06:00 +0200 |
commit | 99855eefd7419c24e9b204fb851ec95adc581b4e (patch) | |
tree | 0d79a68449d770c3c550b43121c0d6d43f602d14 /cpp/src/Ice | |
parent | Allow java libraries to override pom scm data (diff) | |
parent | Stack trace test expec files for Linux (diff) | |
download | ice-99855eefd7419c24e9b204fb851ec95adc581b4e.tar.bz2 ice-99855eefd7419c24e9b204fb851ec95adc581b4e.tar.xz ice-99855eefd7419c24e9b204fb851ec95adc581b4e.zip |
Merge branch '3.6-stretch' into 3.6
Diffstat (limited to 'cpp/src/Ice')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/InstrumentationI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Network.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/Network.h | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 27826fd75f5..be381b67dda 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -61,7 +61,7 @@ # include <sys/types.h> #endif -#if defined(__linux) || defined(__sun) || defined(_AIX) +#if defined(__linux) || defined(__sun) || defined(_AIX) || defined(__GLIBC__) # include <grp.h> // for initgroups #endif diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp index 86897e44943..b590686df45 100644 --- a/cpp/src/Ice/InstrumentationI.cpp +++ b/cpp/src/Ice/InstrumentationI.cpp @@ -25,8 +25,6 @@ using namespace IceMX; namespace { -Context emptyCtx; - int ThreadMetrics::* getThreadStateMetric(ThreadState s) { @@ -354,7 +352,7 @@ public: }; static Attributes attributes; - InvocationHelper(const ObjectPrx& proxy, const string& op, const Context& ctx = emptyCtx) : + InvocationHelper(const ObjectPrx& proxy, const string& op, const Context& ctx) : _proxy(proxy), _operation(op), _context(ctx) { } diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index d7c1c22ba92..7fa9614379c 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -1238,7 +1238,17 @@ IceInternal::closeSocket(SOCKET fd) WSASetLastError(error); #else int error = errno; + +# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + // + // FreeBSD returns ECONNRESET if the underlying object was + // a stream socket that was shut down by the peer before all + // pending data was delivered. + // + if(close(fd) == SOCKET_ERROR && getSocketErrno() != ECONNRESET) +# else if(close(fd) == SOCKET_ERROR) +# endif { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index 458261512f7..ea7ebd61f19 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -45,7 +45,7 @@ typedef int ssize_t; #if defined(__linux) && !defined(ICE_NO_EPOLL) # define ICE_USE_EPOLL 1 -#elif (defined(__APPLE__) || defined(__FreeBSD__)) && TARGET_OS_IPHONE == 0 && !defined(ICE_NO_KQUEUE) +#elif (defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && TARGET_OS_IPHONE == 0 && !defined(ICE_NO_KQUEUE) # define ICE_USE_KQUEUE 1 #elif defined(__APPLE__) && !defined(ICE_NO_CFSTREAM) # define ICE_USE_CFSTREAM 1 |