summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG-3.6.md39
-rw-r--r--Makefile2
-rw-r--r--Makefile.mak11
-rwxr-xr-xcpp/allTests.py2
-rw-r--r--cpp/config/Make.rules.MINGW10
-rw-r--r--cpp/src/Glacier2/Blobject.cpp33
-rw-r--r--cpp/src/Glacier2/RequestQueue.cpp149
-rw-r--r--cpp/src/Glacier2/RequestQueue.h10
-rw-r--r--cpp/src/IceSSL/OpenSSLTransceiverI.cpp7
-rw-r--r--cpp/src/IceSSL/SecureTransportTransceiverI.cpp20
-rw-r--r--cpp/test/Glacier2/router/CallbackI.cpp36
-rw-r--r--cpp/test/Glacier2/router/CallbackI.h4
-rw-r--r--cpp/test/Glacier2/router/Client.cpp27
-rw-r--r--cpp/test/Ice/Makefile9
-rw-r--r--cpp/test/Ice/retry/Client.cpp3
-rw-r--r--cpp/test/Ice/retry/Server.cpp1
-rw-r--r--cpp/test/IceDiscovery/simple/Makefile8
-rw-r--r--cpp/test/IceUtil/stacktrace/Client.cpp78
-rw-r--r--java/test/build.gradle4
-rw-r--r--java/test/controller/build.gradle4
-rw-r--r--js/Makefile5
-rw-r--r--js/Makefile.mak3
-rw-r--r--js/test/Ice/ami/Client.js2
-rw-r--r--js/test/Ice/binding/Client.js18
-rw-r--r--python/BuildInstructionsWindows.md38
-rw-r--r--python/modules/IcePy/Current.cpp2
-rw-r--r--python/modules/IcePy/Operation.cpp8
-rw-r--r--python/modules/IcePy/Types.cpp6
-rwxr-xr-xscripts/TestUtil.py1
29 files changed, 316 insertions, 224 deletions
diff --git a/CHANGELOG-3.6.md b/CHANGELOG-3.6.md
index 8ede4eabad3..cc713945979 100644
--- a/CHANGELOG-3.6.md
+++ b/CHANGELOG-3.6.md
@@ -40,32 +40,43 @@ These are the changes since Ice 3.6.1.
- Added two new tools, icegriddb and icestormdb, used to import/export the
IceGrid and IceStorm databases.
-- Fixed a bug that affects Java and C# generated code. The generated patcher for
- reading class data members was bogus when the class had more than one class data
- member and derived from a class that contained class data members. The same
- issue was true for exceptions with class data members deriving from exceptions
- with class data members.
+- Fixed a bug that affects Java and C# generated code. The generated patcher
+ for reading class data members was bogus when the class had more than one
+ class data member and derived from a class that contained class data
+ members. The same issue was true for exceptions with class data members
+ deriving from exceptions with class data members.
-- Fixed a bug that prevented scripting languages (Python, Ruby, Javascript and PHP)
- from marshaling NaN or Infinity as a floating point value.
+- Fixed a bug that prevented scripting languages (Python, Ruby, Javascript and
+ PHP) from marshaling NaN or Infinity as a floating point value.
-- Fixed an IceGrid bug where resolving endpoints of dynamically registered replica
- groups would fail unless the client was using an encoding superior to the encoding
- of the dynamically registered object adapters.
+- Fixed an IceGrid bug where resolving endpoints of dynamically registered
+ replica groups would fail unless the client was using an encoding superior
+ to the encoding of the dynamically registered object adapters.
- Added missing functions Ice::identityToString and Ice::stringToIdentity
(C++, Objective-C, PHP, Python and Ruby).
-- Added support for universal character names (\uNNNN and \UNNNNNNNN) in Slice string
- constants.
+- Added support for universal character names (\uNNNN and \UNNNNNNNN) in Slice
+ string constants.
+
+- Fixed Glacier2 router bug where requests from client to server could be lost
+ if forwarded as batch requests with the _fwd=O context.
+
+- Fixed Glacier2 bug which would occur in un-buffered mode and when forwarding
+ one-way requests. The Glacier2 router could eventually leak and hang on
+ shutdown.
## C++ Changes
- Fixed El Capitan build issues caused by a new security feature that no longer
exports DYLD_LIBRARY_PATH to child processes.
-- Fixed potential deadlock that could occur when using collocation optimization and
- serialized server thread pools.
+- Fixed potential deadlock that could occur when using collocation optimization
+ and serialized server thread pools.
+
+- Fixed IceSSL bug that would only show up with WSS servers running on OS X
+ and Linux. The WSS server could stop reading requests if the client sent
+ multiple requests within the same SSL record.
## C# Changes
diff --git a/Makefile b/Makefile
index 23b8ce7d45f..22e429ecefd 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@
SUBDIRS = cpp java js python ruby php
CLEAN_SUBDIRS = js java python ruby php cpp
DEPEND_SUBDIRS = cpp python ruby php
-INSTALL_SUBDIRS = cpp java python ruby php js
+INSTALL_SUBDIRS = cpp java python ruby php
ifeq ($(shell uname),Darwin)
SUBDIRS += objective-c
diff --git a/Makefile.mak b/Makefile.mak
index 5c6117756d4..7933251a577 100644
--- a/Makefile.mak
+++ b/Makefile.mak
@@ -21,7 +21,7 @@ TEST_SUBDIRS = cpp python
SUBDIRS = cpp java js csharp
CLEAN_SUBDIRS = cpp java js csharp
DEPEND_SUBDIRS = cpp java js csharp
-INSTALL_SUBDIRS = cpp java js csharp
+INSTALL_SUBDIRS = cpp java csharp
TEST_SUBDIRS = cpp java js csharp
!endif
@@ -39,7 +39,7 @@ all::
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
clean::
- @for %i in ( $(SUBDIRS) ) do \
+ @for %i in ( $(CLEAN_SUBDIRS) ) do \
@echo "making clean in %i" && \
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) clean" || exit 1
@@ -49,12 +49,12 @@ depend::
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) depend" || exit 1
install::
- @for %i in ( $(TEST_SUBDIRS) ) do \
+ @for %i in ( $(INSTALL_SUBDIRS) ) do \
@echo "making install in %i" && \
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) install" || exit 1
test::
- @for %i in ( $(SUBDIRS) ) do \
+ @for %i in ( $(TEST_SUBDIRS) ) do \
@echo "making test in %i" && \
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) test" || exit 1
@@ -78,3 +78,6 @@ php::
@echo "making all in php" && \
cmd /c "cd php && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
+js::
+ @echo "making all in js" && \
+ cmd /c "cd js && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
diff --git a/cpp/allTests.py b/cpp/allTests.py
index fb48f7630c6..49ca349425e 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -78,7 +78,7 @@ tests = [
("Ice/enums", ["once", "bt"]),
("Ice/logger", ["once"]),
("Ice/networkProxy", ["core", "noipv6", "nosocks"]),
- ("Ice/services", ["once"]),
+ ("Ice/services", ["once", "nomingw"]),
("IceSSL/configuration", ["once", "novalgrind"]), # valgrind doesn't work well with openssl
("IceBox/configuration", ["core", "noipv6", "novc100", "nomingw", "nomx"]),
("IceBox/admin", ["core", "noipv6", "novc100", "nomingw", "nomx"]),
diff --git a/cpp/config/Make.rules.MINGW b/cpp/config/Make.rules.MINGW
index 10e67d222c0..7eb120e1b4a 100644
--- a/cpp/config/Make.rules.MINGW
+++ b/cpp/config/Make.rules.MINGW
@@ -23,7 +23,7 @@ CXX = c++
ICE_WIN32_WINNT := 0x601
CXXFLAGS = $(CXXARCHFLAGS) -mthreads -Wall -Werror -D_WIN32_WINNT=$(ICE_WIN32_WINNT) -DWIN32_LEAN_AND_MEAN
-LDFLAGS = -Wl,-no-undefined
+LDFLAGS = -Wl,-no-undefined
ifeq ($(STATICLIBS),yes)
CXXFLAGS += -DICE_STATIC_LIBS
@@ -105,7 +105,7 @@ libdir := $(top_srcdir)/$(libsubdir)
bindir := $(top_srcdir)/$(binsubdir)
installlib = $(INSTALL) $(2)/$(3) $(1); \
- chmod a+rx $(1)/$(3)
+ chmod a+rx $(1)/$(3)
installprogram = $(INSTALL_PROGRAM) $(1) $(2); \
chmod a+rx $(2)/$(notdir $(1))
@@ -114,16 +114,16 @@ SSL_OS_LIBS = -lsecur32 -lcrypt32 -lws2_32
ifeq ($(STATICLIBS),yes)
BASELIBS = -liceutil $(ICEUTIL_OS_LIBS)
-LIBS = -lice $(BASELIBS)
+LIBS = -lice $(BASELIBS)
ICESSL_LIBS = -licessl
SLICE_LIBS = -lslice $(BASELIBS)
else
BASELIBS = -liceutil$(SOVERSION)$(COMPSUFFIX) $(ICEUTIL_OS_LIBS)
-LIBS = -lice$(SOVERSION)$(COMPSUFFIX) $(BASELIBS)
+LIBS = -lice$(SOVERSION)$(COMPSUFFIX) $(BASELIBS)
ICESSL_LIBS = -licessl$(SOVERSION)$(COMPSUFFIX)
SLICE_LIBS = -lslice$(SOVERSION)$(COMPSUFFIX) $(BASELIBS)
endif
-ICEUTIL_OS_LIBS = -lrpcrt4 -ladvapi32
+ICEUTIL_OS_LIBS = -lrpcrt4 -ladvapi32 -lshlwapi
ICE_OS_LIBS = $(ICEUTIL_OS_LIBS) -lIphlpapi -lws2_32
EXE_EXT = .exe
diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp
index a9c2ce55f80..1f58da34ffb 100644
--- a/cpp/src/Glacier2/Blobject.cpp
+++ b/cpp/src/Glacier2/Blobject.cpp
@@ -48,7 +48,7 @@ Glacier2::Blobject::Blobject(const InstancePtr& instance, const ConnectionPtr& r
_instance->properties()->getPropertyAsInt(clientTraceOverride)),
_context(context)
{
- RequestQueueThreadPtr t = _reverseConnection ? _instance->serverRequestQueueThread() :
+ RequestQueueThreadPtr t = _reverseConnection ? _instance->serverRequestQueueThread() :
_instance->clientRequestQueueThread();
if(t)
{
@@ -86,17 +86,14 @@ Glacier2::Blobject::invokeResponse(bool ok, const pair<const Byte*, const Byte*>
}
void
-Glacier2::Blobject::invokeSent(bool sent, const AMD_Object_ice_invokePtr& amdCB)
+Glacier2::Blobject::invokeSent(bool, const AMD_Object_ice_invokePtr& amdCB)
{
- if(sent)
- {
#if (defined(_MSC_VER) && (_MSC_VER >= 1600))
- amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr),
- static_cast<const Byte*>(nullptr)));
+ amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr),
+ static_cast<const Byte*>(nullptr)));
#else
- amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0));
+ amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0));
#endif
- }
}
void
@@ -124,7 +121,7 @@ Glacier2::Blobject::invokeException(const Exception& ex, const AMD_Object_ice_in
}
void
-Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB,
+Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB,
const std::pair<const Byte*, const Byte*>& inParams, const Current& current)
{
//
@@ -171,7 +168,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
proxy = proxy->ice_twoway();
break;
}
-
+
case 'o':
{
if(_alwaysBatch && _requestQueue)
@@ -184,7 +181,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
break;
}
-
+
case 'd':
{
if(_alwaysBatch && _requestQueue)
@@ -197,7 +194,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
break;
}
-
+
case 'O':
{
if(_requestQueue)
@@ -210,7 +207,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
break;
}
-
+
case 'D':
{
if(_requestQueue)
@@ -223,19 +220,19 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
break;
}
-
+
case 's':
{
proxy = proxy->ice_secure(true);
break;
}
-
+
case 'z':
{
proxy = proxy->ice_compress(true);
break;
}
-
+
default:
{
Warning out(_instance->logger());
@@ -245,7 +242,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
}
}
-
+
if(_requestTraceLevel >= 1)
{
Trace out(_instance->logger(), "Glacier2");
@@ -284,7 +281,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd
}
if(_requestQueue)
- {
+ {
//
// If we are in buffered mode, we create a new request and add
// it to the request queue. If the request is twoway, we use
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp
index 78eff63bce0..5acc66dbfa9 100644
--- a/cpp/src/Glacier2/RequestQueue.cpp
+++ b/cpp/src/Glacier2/RequestQueue.cpp
@@ -10,7 +10,6 @@
#include <Glacier2/RequestQueue.h>
#include <Glacier2/Instance.h>
#include <Glacier2/SessionRouterI.h>
-#include <set>
using namespace std;
using namespace Ice;
@@ -33,6 +32,19 @@ Glacier2::Request::Request(const ObjectPrx& proxy, const std::pair<const Byte*,
}
}
+void
+Glacier2::Request::addBatchProxy(set<Ice::ObjectPrx>& batchProxies)
+{
+ set<Ice::ObjectPrx>::const_iterator p = batchProxies.find(_proxy);
+ if(p == batchProxies.end())
+ {
+ batchProxies.insert(_proxy);
+ }
+ else if(p->get() != _proxy.get())
+ {
+ const_cast<Ice::ObjectPrx&>(_proxy) = *p;
+ }
+}
Ice::AsyncResultPtr
Glacier2::Request::invoke(const Callback_Object_ice_invokePtr& cb)
@@ -52,7 +64,7 @@ Glacier2::Request::invoke(const Callback_Object_ice_invokePtr& cb)
{
ByteSeq outParams;
if(_forwardContext)
- {
+ {
if(_sslContext.size() > 0)
{
Ice::Context ctx = _current.ctx;
@@ -81,7 +93,7 @@ Glacier2::Request::invoke(const Callback_Object_ice_invokePtr& cb)
{
Ice::AsyncResultPtr result;
if(_forwardContext)
- {
+ {
if(_sslContext.size() > 0)
{
Ice::Context ctx = _current.ctx;
@@ -131,7 +143,7 @@ Glacier2::Request::override(const RequestPtr& other) const
//
// Don't override if the override isn't the same.
- //
+ //
if(_override != other->_override)
{
return false;
@@ -163,13 +175,13 @@ Glacier2::Request::exception(const Ice::Exception& ex)
}
}
-void
+void
Glacier2::Request::queued()
{
if(!_proxy->ice_isTwoway())
{
#if (defined(_MSC_VER) && (_MSC_VER >= 1600))
- _amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr),
+ _amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr),
static_cast<const Byte*>(nullptr)));
#else
_amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0));
@@ -177,8 +189,8 @@ Glacier2::Request::queued()
}
}
-Glacier2::RequestQueue::RequestQueue(const RequestQueueThreadPtr& requestQueueThread,
- const InstancePtr& instance,
+Glacier2::RequestQueue::RequestQueue(const RequestQueueThreadPtr& requestQueueThread,
+ const InstancePtr& instance,
const Ice::ConnectionPtr& connection) :
_requestQueueThread(requestQueueThread),
_instance(instance),
@@ -219,7 +231,17 @@ Glacier2::RequestQueue::addRequest(const RequestPtr& request)
}
}
}
-
+
+ if(!_connection)
+ {
+ //
+ // If it's a batch request, we make sure we use a unique batch proxy object for the queued
+ // batch requests. We want all the requests for the same batch proxy to be queued on the
+ // same proxy object.
+ //
+ request->addBatchProxy(_batchProxies);
+ }
+
//
// No override, we add the new request.
//
@@ -237,7 +259,7 @@ Glacier2::RequestQueue::addRequest(const RequestPtr& request)
}
void
-Glacier2::RequestQueue::flushRequests(set<Ice::ObjectPrx>& batchProxies)
+Glacier2::RequestQueue::flushRequests()
{
IceUtil::Mutex::Lock lock(*this);
if(_connection)
@@ -250,7 +272,34 @@ Glacier2::RequestQueue::flushRequests(set<Ice::ObjectPrx>& batchProxies)
}
else
{
- flush(batchProxies);
+ for(deque<RequestPtr>::const_iterator p = _requests.begin(); p != _requests.end(); ++p)
+ {
+ try
+ {
+ if(_observer)
+ {
+ _observer->forwarded(!_connection);
+ }
+ assert(_callback);
+ (*p)->invoke(_callback);
+ }
+ catch(const Ice::LocalException&)
+ {
+ // Ignore, this can occur for batch requests.
+ }
+ }
+ _requests.clear();
+
+ for(set<Ice::ObjectPrx>::const_iterator q = _batchProxies.begin(); q != _batchProxies.end(); ++q)
+ {
+ (*q)->begin_ice_flushBatchRequests();
+ }
+ _batchProxies.clear();
+ }
+
+ if(_destroyed && _requests.empty())
+ {
+ destroyInternal();
}
}
@@ -279,20 +328,6 @@ Glacier2::RequestQueue::updateObserver(const Glacier2::Instrumentation::SessionO
}
void
-Glacier2::RequestQueue::destroyInternal()
-{
- //
- // Must be called with the mutex locked.
- //
-
- //
- // Remove cyclic references.
- //
- const_cast<Ice::Callback_Object_ice_invokePtr&>(_callback) = 0;
- const_cast<Ice::Callback_Connection_flushBatchRequestsPtr&>(_flushCallback) = 0;
-}
-
-void
Glacier2::RequestQueue::flush()
{
assert(_connection);
@@ -314,7 +349,7 @@ Glacier2::RequestQueue::flush()
if(!result)
{
flushBatchRequests = true;
- }
+ }
else if(!result->sentSynchronously() && !result->isCompleted())
{
_pendingSend = true;
@@ -346,44 +381,20 @@ Glacier2::RequestQueue::flush()
_pendingSendRequest = 0;
}
}
-
- if(_destroyed && _requests.empty())
- {
- destroyInternal();
- }
}
void
-Glacier2::RequestQueue::flush(set<Ice::ObjectPrx>& batchProxies)
+Glacier2::RequestQueue::destroyInternal()
{
- assert(!_connection);
-
- for(deque<RequestPtr>::const_iterator p = _requests.begin(); p != _requests.end(); ++p)
- {
- try
- {
- if(_observer)
- {
- _observer->forwarded(!_connection);
- }
- assert(_callback);
- Ice::AsyncResultPtr result = (*p)->invoke(_callback);
- if(!result)
- {
- batchProxies.insert((*p)->getProxy());
- }
- }
- catch(const Ice::LocalException&)
- {
- // Ignore, this can occur for batch requests.
- }
- }
- _requests.clear();
+ //
+ // Must be called with the mutex locked.
+ //
- if(_destroyed)
- {
- destroyInternal();
- }
+ //
+ // Remove cyclic references.
+ //
+ const_cast<Ice::Callback_Object_ice_invokePtr&>(_callback) = 0;
+ const_cast<Ice::Callback_Connection_flushBatchRequestsPtr&>(_flushCallback) = 0;
}
void
@@ -427,7 +438,7 @@ Glacier2::RequestQueue::exception(const Ice::Exception& ex, const RequestPtr& re
}
}
-void
+void
Glacier2::RequestQueue::sent(bool sentSynchronously, const RequestPtr& request)
{
if(_connection && !sentSynchronously)
@@ -454,12 +465,12 @@ Glacier2::RequestQueueThread::~RequestQueueThread()
assert(_queues.empty());
}
-void
+void
Glacier2::RequestQueueThread::destroy()
{
{
IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
-
+
assert(!_destroy);
_destroy = true;
_sleep = false;
@@ -534,7 +545,7 @@ Glacier2::RequestQueueThread::run()
}
//
- // If the queue is being destroyed and there's no requests or responses
+ // If the queue is being destroyed and there's no requests or responses
// to send, we're done.
//
if(_destroy && _queues.empty())
@@ -543,7 +554,7 @@ Glacier2::RequestQueueThread::run()
}
assert(!_queues.empty() && !_sleep);
-
+
queues.swap(_queues);
if(_sleepTime > IceUtil::Time())
@@ -552,16 +563,10 @@ Glacier2::RequestQueueThread::run()
_sleepDuration = _sleepTime;
}
}
-
- set<Ice::ObjectPrx> flushProxySet;
- for(vector<RequestQueuePtr>::const_iterator p = queues.begin(); p != queues.end(); ++p)
- {
- (*p)->flushRequests(flushProxySet);
- }
- for(set<Ice::ObjectPrx>::const_iterator q = flushProxySet.begin(); q != flushProxySet.end(); ++q)
+ for(vector<RequestQueuePtr>::const_iterator p = queues.begin(); p != queues.end(); ++p)
{
- (*q)->begin_ice_flushBatchRequests();
+ (*p)->flushRequests();
}
}
}
diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h
index d918584e1d5..94ca48b089f 100644
--- a/cpp/src/Glacier2/RequestQueue.h
+++ b/cpp/src/Glacier2/RequestQueue.h
@@ -36,10 +36,10 @@ public:
Request(const Ice::ObjectPrx&, const std::pair<const Ice::Byte*, const Ice::Byte*>&, const Ice::Current&, bool,
const Ice::Context&, const Ice::AMD_Object_ice_invokePtr&);
-
+
Ice::AsyncResultPtr invoke(const Ice::Callback_Object_ice_invokePtr& callback);
bool override(const RequestPtr&) const;
- const Ice::ObjectPrx& getProxy() const { return _proxy; }
+ void addBatchProxy(std::set<Ice::ObjectPrx>&);
bool hasOverride() const { return !_override.empty(); }
private:
@@ -65,7 +65,7 @@ public:
RequestQueue(const RequestQueueThreadPtr&, const InstancePtr&, const Ice::ConnectionPtr&);
bool addRequest(const RequestPtr&);
- void flushRequests(std::set<Ice::ObjectPrx>&);
+ void flushRequests();
void destroy();
@@ -76,12 +76,11 @@ private:
void destroyInternal();
void flush();
- void flush(std::set<Ice::ObjectPrx>&);
void response(bool, const std::pair<const Ice::Byte*, const Ice::Byte*>&, const RequestPtr&);
void exception(const Ice::Exception&, const RequestPtr&);
void sent(bool, const RequestPtr&);
-
+
const RequestQueueThreadPtr _requestQueueThread;
const InstancePtr _instance;
const Ice::ConnectionPtr _connection;
@@ -89,6 +88,7 @@ private:
const Ice::Callback_Connection_flushBatchRequestsPtr _flushCallback;
std::deque<RequestPtr> _requests;
+ std::set<Ice::ObjectPrx> _batchProxies;
bool _pendingSend;
RequestPtr _pendingSendRequest;
bool _destroyed;
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
index 99248a74a2d..2178c292ea0 100644
--- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
+++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
@@ -466,6 +466,8 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf)
return IceInternal::SocketOperationNone;
}
+ _stream->ready(IceInternal::SocketOperationRead, false);
+
//
// It's impossible for packetSize to be more than an Int.
//
@@ -555,6 +557,11 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf)
}
}
+ //
+ // Check if there's still buffered data to read, set the read ready status.
+ //
+ _stream->ready(IceInternal::SocketOperationRead, SSL_pending(_ssl) > 0);
+
return IceInternal::SocketOperationNone;
}
diff --git a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
index dc9d421b957..b043ef19713 100644
--- a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
+++ b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
@@ -407,17 +407,13 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf)
return _stream->read(buf);
}
- //
- // Note: we assume that SecureTransport doesn't read more SSL records
- // than necessary to fill the requested data and that the sender sends
- // Ice messages in individual SSL records.
- //
-
if(buf.i == buf.b.end())
{
return IceInternal::SocketOperationNone;
}
+ _stream->ready(IceInternal::SocketOperationRead, false);
+
size_t packetSize = std::min(static_cast<size_t>(buf.b.end() - buf.i), _maxRecvPacketSize);
while(buf.i != buf.b.end())
{
@@ -464,6 +460,18 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf)
packetSize = buf.b.end() - buf.i;
}
}
+
+ //
+ // Check if there's still buffered data to read. In this case, set the read ready status.
+ //
+ size_t buffered = 0;
+ OSStatus err = SSLGetBufferedReadSize(_ssl, &buffered);
+ if(err)
+ {
+ errno = err;
+ throw SocketException(__FILE__, __LINE__, IceInternal::getSocketErrno());
+ }
+ _stream->ready(IceInternal::SocketOperationRead, buffered > 0);
return IceInternal::SocketOperationNone;
}
diff --git a/cpp/test/Glacier2/router/CallbackI.cpp b/cpp/test/Glacier2/router/CallbackI.cpp
index ccf22fe5a15..365a7b3d896 100644
--- a/cpp/test/Glacier2/router/CallbackI.cpp
+++ b/cpp/test/Glacier2/router/CallbackI.cpp
@@ -109,7 +109,7 @@ public:
typedef IceUtil::Handle<AsyncCB> AsyncCBPtr;
CallbackReceiverI::CallbackReceiverI() :
- _callback(false),
+ _callback(0),
_waitCallback(false),
_callbackWithPayload(false),
_finishWaitCallback(false)
@@ -120,8 +120,7 @@ void
CallbackReceiverI::callback(const Current&)
{
Lock sync(*this);
- assert(!_callback);
- _callback = true;
+ ++_callback;
notifyAll();
}
@@ -179,16 +178,15 @@ CallbackReceiverI::callbackWithPayload(const Ice::ByteSeq&, const Current&)
}
void
-CallbackReceiverI::callbackOK()
+CallbackReceiverI::callbackOK(int expected)
{
Lock sync(*this);
- while(!_callback)
+ while(_callback != expected)
{
wait();
}
-
- _callback = false;
+ _callback = 0;
}
void
@@ -254,8 +252,8 @@ CallbackI::initiateCallback_async(const AMD_Callback_initiateCallbackPtr& cb,
if(proxy->ice_isTwoway())
{
AsyncCBPtr acb = new AsyncCB();
- proxy->begin_callback(current.ctx,
- newCallback_CallbackReceiver_callback(acb, &AsyncCB::responseCallback, &AsyncCB::exceptionCallback),
+ proxy->begin_callback(current.ctx,
+ newCallback_CallbackReceiver_callback(acb, &AsyncCB::responseCallback, &AsyncCB::exceptionCallback),
newCookie(cb));
}
else
@@ -272,8 +270,8 @@ CallbackI::initiateCallbackEx_async(const AMD_Callback_initiateCallbackExPtr& cb
if(proxy->ice_isTwoway())
{
AsyncCBPtr acb = new AsyncCB();
- proxy->begin_callbackEx(current.ctx,
- newCallback_CallbackReceiver_callbackEx(acb, &AsyncCB::responseCallbackEx, &AsyncCB::exceptionCallbackEx),
+ proxy->begin_callbackEx(current.ctx,
+ newCallback_CallbackReceiver_callbackEx(acb, &AsyncCB::responseCallbackEx, &AsyncCB::exceptionCallbackEx),
newCookie(cb));
}
else
@@ -290,32 +288,32 @@ CallbackI::initiateConcurrentCallback_async(const AMD_Callback_initiateConcurren
const Current& current)
{
AsyncCBPtr acb = new AsyncCB();
- proxy->begin_concurrentCallback(number, current.ctx,
+ proxy->begin_concurrentCallback(number, current.ctx,
newCallback_CallbackReceiver_concurrentCallback(acb, &AsyncCB::responseConcurrentCallback,
- &AsyncCB::exceptionConcurrentCallback),
+ &AsyncCB::exceptionConcurrentCallback),
newCookie(cb));
}
void
CallbackI::initiateWaitCallback_async(const AMD_Callback_initiateWaitCallbackPtr& cb,
- const CallbackReceiverPrx& proxy,
+ const CallbackReceiverPrx& proxy,
const Current& current)
{
AsyncCBPtr acb = new AsyncCB();
- proxy->begin_waitCallback(current.ctx,
+ proxy->begin_waitCallback(current.ctx,
newCallback_CallbackReceiver_waitCallback(acb, &AsyncCB::responseWaitCallback, &AsyncCB::exceptionWaitCallback),
newCookie(cb));
}
void
-CallbackI::initiateCallbackWithPayload_async(const AMD_Callback_initiateCallbackWithPayloadPtr& cb,
- const CallbackReceiverPrx& proxy,
+CallbackI::initiateCallbackWithPayload_async(const AMD_Callback_initiateCallbackWithPayloadPtr& cb,
+ const CallbackReceiverPrx& proxy,
const Current& current)
{
Ice::ByteSeq seq(1000 * 1024, 0);
AsyncCBPtr acb = new AsyncCB();
- proxy->begin_callbackWithPayload(seq, current.ctx,
- newCallback_CallbackReceiver_callbackWithPayload(acb, &AsyncCB::responseCallbackWithPayload,
+ proxy->begin_callbackWithPayload(seq, current.ctx,
+ newCallback_CallbackReceiver_callbackWithPayload(acb, &AsyncCB::responseCallbackWithPayload,
&AsyncCB::exceptionCallbackWithPayload),
newCookie(cb));
}
diff --git a/cpp/test/Glacier2/router/CallbackI.h b/cpp/test/Glacier2/router/CallbackI.h
index 548c8f64239..2d9841f660c 100644
--- a/cpp/test/Glacier2/router/CallbackI.h
+++ b/cpp/test/Glacier2/router/CallbackI.h
@@ -30,7 +30,7 @@ public:
virtual void waitCallback(const ::Ice::Current&);
virtual void callbackWithPayload(const Ice::ByteSeq&, const ::Ice::Current&);
- void callbackOK();
+ void callbackOK(int = 1);
void waitCallbackOK();
void callbackWithPayloadOK();
void notifyWaitCallback();
@@ -38,7 +38,7 @@ public:
private:
- bool _callback;
+ int _callback;
bool _waitCallback;
bool _callbackWithPayload;
bool _finishWaitCallback;
diff --git a/cpp/test/Glacier2/router/Client.cpp b/cpp/test/Glacier2/router/Client.cpp
index 5f7d4152cb7..1987e693dbc 100644
--- a/cpp/test/Glacier2/router/Client.cpp
+++ b/cpp/test/Glacier2/router/Client.cpp
@@ -612,7 +612,10 @@ CallbackClient::run(int argc, char* argv[])
Context context;
context["_fwd"] = "o";
oneway->initiateCallback(onewayR, context);
- callbackReceiverImpl->callbackOK();
+ oneway->initiateCallback(onewayR, context);
+ oneway->initiateCallback(onewayR, context);
+ oneway->initiateCallback(onewayR, context);
+ callbackReceiverImpl->callbackOK(4);
cout << "ok" << endl;
}
@@ -621,7 +624,27 @@ CallbackClient::run(int argc, char* argv[])
Context context;
context["_fwd"] = "t";
twoway->initiateCallback(twowayR, context);
- callbackReceiverImpl->callbackOK();
+ twoway->initiateCallback(twowayR, context);
+ twoway->initiateCallback(twowayR, context);
+ twoway->initiateCallback(twowayR, context);
+ callbackReceiverImpl->callbackOK(4);
+ cout << "ok" << endl;
+ }
+
+ {
+ cout << "testing batch oneway callback... " << flush;
+ Context context;
+ context["_fwd"] = "O";
+ CallbackPrx batchOneway = CallbackPrx::uncheckedCast(twoway->ice_batchOneway());
+ CallbackReceiverPrx onewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_oneway());
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR, context);
+ batchOneway->ice_flushBatchRequests();
+ callbackReceiverImpl->callbackOK(6);
cout << "ok" << endl;
}
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index b9babdaeab6..94f9a14682e 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -46,8 +46,6 @@ SUBDIRS = proxy \
metrics \
enums \
logger \
- networkProxy \
- services \
impl \
stream
@@ -56,7 +54,12 @@ SUBDIRS := $(SUBDIRS) \
optional \
gc \
custom \
- echo
+ echo \
+ networkProxy
+endif
+
+ifeq ($(findstring MINGW,$(UNAME)),)
+SUBDIRS := $(SUBDIRS) services
endif
.PHONY: $(EVERYTHING) $(SUBDIRS)
diff --git a/cpp/test/Ice/retry/Client.cpp b/cpp/test/Ice/retry/Client.cpp
index 9efc4a6c764..176071a2f71 100644
--- a/cpp/test/Ice/retry/Client.cpp
+++ b/cpp/test/Ice/retry/Client.cpp
@@ -44,6 +44,9 @@ main(int argc, char* argv[])
//
initData.properties->setProperty("Ice.Warn.Connections", "0");
+ // Disable PrintStackTraces otherwise the test can fail on Windows/Debug
+ initData.properties->setProperty("Ice.PrintStackTraces", "0");
+
initData.properties->setProperty("Ice.RetryIntervals", "0 1 10 1");
Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp
index 36ebe9b3a0a..ceb38ab5282 100644
--- a/cpp/test/Ice/retry/Server.cpp
+++ b/cpp/test/Ice/retry/Server.cpp
@@ -39,6 +39,7 @@ main(int argc, char* argv[])
Ice::InitializationData initData;
initData.properties = Ice::createProperties(argc, argv);
initData.properties->setProperty("Ice.Warn.Dispatch", "0");
+ initData.properties->setProperty("Ice.PrintStackTraces", "0");
Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
return run(argc, argv, ich.communicator());
}
diff --git a/cpp/test/IceDiscovery/simple/Makefile b/cpp/test/IceDiscovery/simple/Makefile
index aaa46cb42e6..ffff74f3bef 100644
--- a/cpp/test/IceDiscovery/simple/Makefile
+++ b/cpp/test/IceDiscovery/simple/Makefile
@@ -31,9 +31,15 @@ include $(top_srcdir)/config/Make.rules
CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+ifneq ($(findstring MINGW,$(UNAME)),)
+ICEDISOVERY_LIBS = -licediscovery$(SOVERSION)$(COMPSUFFIX)
+else
+ICEDISOVERY_LIBS = -lIceDiscovery
+endif
+
$(CLIENT): $(COBJS)
rm -f $@
- $(call mktest,$@,$(COBJS), -lIceDiscovery $(LIBS))
+ $(call mktest,$@,$(COBJS), $(ICEDISOVERY_LIBS) $(LIBS))
$(SERVER): $(SOBJS)
rm -f $@
diff --git a/cpp/test/IceUtil/stacktrace/Client.cpp b/cpp/test/IceUtil/stacktrace/Client.cpp
index 7e12df183d6..4a16654b698 100644
--- a/cpp/test/IceUtil/stacktrace/Client.cpp
+++ b/cpp/test/IceUtil/stacktrace/Client.cpp
@@ -224,42 +224,66 @@ int main(int argc, char* argv[])
filename += ".Linux";
#endif
- ifstream ifs(filename.c_str());
- stringstream sstr;
- sstr << ifs.rdbuf();
+ while(true)
+ {
+ ifstream ifs(filename.c_str());
+ stringstream sstr;
+ sstr << ifs.rdbuf();
#if defined(__APPLE__)
- string expected = sstr.str();
- standardizeVersion(expected);
+ string expected = sstr.str();
+ standardizeVersion(expected);
#else
- vector<string> expected = splitLines(sstr.str());
+ vector<string> expected = splitLines(sstr.str());
#endif
- ThrowerPtr thrower = new Thrower();
- try
- {
- thrower->first();
- }
- catch(const IceUtil::Exception& ex)
- {
- string stack = ex.ice_stackTrace();
-#ifdef __APPLE__
- standardizeVersion(stack);
- if(expected.size() < stack.size())
+ ThrowerPtr thrower = new Thrower();
+ try
{
- test(stack.compare(0, expected.size(), expected) == 0);
+ thrower->first();
}
- else
+ catch(const IceUtil::Exception& ex)
{
- test(stack == expected);
- }
+ string stack = ex.ice_stackTrace();
+#ifdef __APPLE__
+ standardizeVersion(stack);
+ if(expected.size() < stack.size())
+ {
+ test(stack.compare(0, expected.size(), expected) == 0);
+ }
+ else
+ {
+ test(stack == expected);
+ }
+ break;
#else
- vector<string> actual = splitLines(stack);
- test(expected.size() <= actual.size());
- for(size_t i = 0; i < expected.size(); ++i)
- {
- test(actual[i].find(expected[i]) != string::npos);
- }
+ vector<string> actual = splitLines(stack);
+ test(expected.size() <= actual.size());
+ for(size_t i = 0; i < expected.size(); ++i)
+ {
+ if(actual[i].find(expected[i]) == string::npos)
+ {
+#if defined(_WIN32) && defined(NDEBUG)
+ //
+ // With windows optimized builds retry with the alternate
+ // expect file.
+ //
+ if(filename != "StackTrace.release.Win32")
+ {
+ filename = "StackTrace.release.Win32";
+ continue;
+ }
+ else
+ {
+ test(false);
+ }
+#else
+ test(false);
+#endif
+ }
+ }
+ break;
#endif
+ }
}
cout << "ok" << endl;
#else
diff --git a/java/test/build.gradle b/java/test/build.gradle
index 70d2aa0acd5..93acf297012 100644
--- a/java/test/build.gradle
+++ b/java/test/build.gradle
@@ -19,6 +19,7 @@ sourceSets {
exclude '**/lambda'
}
exclude 'plugins'
+ exclude 'controller'
exclude 'ejb'
}
}
@@ -33,6 +34,7 @@ dependencies {
compile localDependency('icestorm')
compile localDependency('icegrid')
compile project(':testPlugins')
+ compile project(':testController')
runtime "org.apache.tools:bzip2:1.0"
}
@@ -51,5 +53,3 @@ clean {
}
delete("src/main/java/test/Slice/generation/classes")
}
-
-
diff --git a/java/test/controller/build.gradle b/java/test/controller/build.gradle
index 6a488d49e31..9dd0187b74b 100644
--- a/java/test/controller/build.gradle
+++ b/java/test/controller/build.gradle
@@ -11,7 +11,7 @@ sourceCompatibility = iceSourceCompatibility
targetCompatibility = iceTargetCompatibility
dependencies {
- compile project(':ice')
+ compile localDependency('ice')
}
jar {
@@ -19,4 +19,4 @@ jar {
attributes("Main-Class": "Test.Common.ControllerServer")
attributes("Class-Path": configurations.runtime.resolve().collect { it.toURI() }.join(' '))
}
-}
+}
diff --git a/js/Makefile b/js/Makefile
index 63c606450a3..356df4acb72 100644
--- a/js/Makefile
+++ b/js/Makefile
@@ -20,9 +20,6 @@ dist: npminstall
clean: npminstall
$(NPM) run gulp:clean
-install: npminstall
- $(NPM) run gulp:install
-
lint: npminstall
$(NPM) run gulp:lint
@@ -30,4 +27,4 @@ test:
@python ./allTests.py
npminstall:
- $(NPM) install \ No newline at end of file
+ $(NPM) install
diff --git a/js/Makefile.mak b/js/Makefile.mak
index 3b08e3a5087..1c76e0fccfa 100644
--- a/js/Makefile.mak
+++ b/js/Makefile.mak
@@ -20,9 +20,6 @@ dist: npminstall
clean: npminstall
$(NPM) run gulp:clean
-install:: npminstall
- $(NPM) run gulp:install
-
lint:: npminstall
$(NPM) run gulp:lint
diff --git a/js/test/Ice/ami/Client.js b/js/test/Ice/ami/Client.js
index 44f4b718232..8052b8e77d3 100644
--- a/js/test/Ice/ami/Client.js
+++ b/js/test/Ice/ami/Client.js
@@ -429,7 +429,7 @@
return testController.resumeAdapter().then(
function()
{
- p.ice_ping().then(
+ return p.ice_ping().then(
function()
{
test(!r1.isSent() && r1.isCompleted());
diff --git a/js/test/Ice/binding/Client.js b/js/test/Ice/binding/Client.js
index fdf01f51ed2..c44e07a3a75 100644
--- a/js/test/Ice/binding/Client.js
+++ b/js/test/Ice/binding/Client.js
@@ -1165,8 +1165,22 @@
return p;
};
- exports.__test__ = run;
- exports.__runServer__ = true;
+ if(typeof(navigator) !== 'undefined' && isSafari() && isWorker())
+ {
+ //
+ // With Safari 9.1 and WebWorkers, this test hangs in communicator destruction. The
+ // web socket send() method never returns for the sending of close connection message.
+ //
+ exports.__test__ = function(out, id)
+ {
+ out.writeLine("Test not supported with Safari web workers.");
+ }
+ }
+ else
+ {
+ exports.__test__ = run;
+ exports.__runServer__ = true;
+ }
}
(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined,
typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : this.Ice.__require,
diff --git a/python/BuildInstructionsWindows.md b/python/BuildInstructionsWindows.md
index 11267530732..21e3630db9c 100644
--- a/python/BuildInstructionsWindows.md
+++ b/python/BuildInstructionsWindows.md
@@ -26,14 +26,9 @@ compatible with the one used to build Ice for C++.
The Python interpreter is readily available on Windows platforms. You can build
it yourself using Microsoft Visual C++, or obtain a binary distribution from the
Python web site. The Python 3.5.x binary distribution is compiled with Visual
-C++ 14, and you should use this binary distribution if you want to compile the
-Ice extension with Visual C++ 14.
-
-Open a command prompt for example, when using Visual Studio 2015, you have
-several alternatives:
-
-- VS2015 x86 Native Tools Command Prompt
-- VS2015 x64 Native Tools Command Prompt
+C++ 14, Python 3.4.x and Python 2.7.x are compiled with Visual C++ 10, you
+should compile the Ice extension with the same Visual C++ version that your
+Python binary distribution was compiled.
Using the first configurations produces 32-bit binaries, while the second
configurations produce 64-bit binaries.
@@ -67,28 +62,29 @@ The debug version of the extension for `x64` platform will be placed in
The supported values for the `Configuration` property are `Debug` and `Release`.
-If you wan to build the extension for other platform that the command prompt default
-platform, you need to set the MSbuild `Platform` property, the supported values for
-this property are `Win32` and `x64`.
+If you wan to build the extension for other platform that the command prompt
+default platform, you need to set the MSbuild `Platform` property, the supported
+values for this property are `Win32` and `x64`.
-The following command will build the extension `x64` platform binaries with `Release`
-configuration:
+The following command will build the extension `x64` platform binaries with
+`Release` configuration:
> MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=x64
-And the next command will build the extension `Win32` platform binaries with `Release`
-configuration:
+And the next command will build the extension `Win32` platform binaries with
+`Release` configuration:
> MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=Win32
-> *When using the MSBuild Platform property the build platform doesn't depend on the
-command prompt default platform*
+> *When using the MSBuild Platform property the build platform doesn't depend on
+the command prompt default platform*
-The build will use a default Python location defined in `python\msbuild\ice.props`,
-it can be override by setting the `PythonHome` MSBuild property.
+The build will use a default Python location defined in
+`python\msbuild\ice.props`, it can be override by setting the `PythonHome`
+MSBuild property.
-The following command will use Python installation from `C:\Python35-AMD64` instead of
-the default location:
+The following command will use Python installation from `C:\Python35-AMD64`
+instead of the default location:
> MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=x64 /p:PythonHome=C:\Python35-AMD64
diff --git a/python/modules/IcePy/Current.cpp b/python/modules/IcePy/Current.cpp
index 9832d1913a6..7afb2461dd4 100644
--- a/python/modules/IcePy/Current.cpp
+++ b/python/modules/IcePy/Current.cpp
@@ -113,7 +113,7 @@ currentGetter(CurrentObject* self, void* closure)
assert(self->current);
- long field = reinterpret_cast<long>(closure);
+ Py_ssize_t field = reinterpret_cast<Py_ssize_t>(closure);
switch(field)
{
case CURRENT_ADAPTER:
diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp
index 9c8744b399b..6d4e3660fb2 100644
--- a/python/modules/IcePy/Operation.cpp
+++ b/python/modules/IcePy/Operation.cpp
@@ -1026,7 +1026,7 @@ void
IcePy::ParamInfo::unmarshaled(PyObject* val, PyObject* target, void* closure)
{
assert(PyTuple_Check(target));
- long i = reinterpret_cast<long>(closure);
+ Py_ssize_t i = reinterpret_cast<Py_ssize_t>(closure);
PyTuple_SET_ITEM(target, i, val);
Py_INCREF(val); // PyTuple_SET_ITEM steals a reference.
}
@@ -1644,7 +1644,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice:
ParamInfoPtr info = *p;
if(!info->optional)
{
- void* closure = reinterpret_cast<void*>(info->pos);
+ void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos));
info->type->unmarshal(&is, info, results.get(), closure, false, &info->metaData);
}
}
@@ -1655,7 +1655,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice:
if(_op->returnType && !_op->returnType->optional)
{
assert(_op->returnType->pos == 0);
- void* closure = reinterpret_cast<void*>(_op->returnType->pos);
+ void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(_op->returnType->pos));
_op->returnType->type->unmarshal(&is, _op->returnType, results.get(), closure, false, &_op->metaData);
}
@@ -1667,7 +1667,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice:
ParamInfoPtr info = *p;
if(is.readOptional(info->tag, info->type->optionalFormat()))
{
- void* closure = reinterpret_cast<void*>(info->pos);
+ void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos));
info->type->unmarshal(&is, info, results.get(), closure, true, &info->metaData);
}
else
diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp
index 24fc0ae7c58..a0edca1a301 100644
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -717,7 +717,7 @@ IcePy::PrimitiveInfo::validate(PyObject* p)
{
// Ensure double does not exceed maximum float value before casting
double val = PyFloat_AsDouble(p);
- return (val <= numeric_limits<float>::max() && val >= -numeric_limits<float>::max()) ||
+ return (val <= numeric_limits<float>::max() && val >= -numeric_limits<float>::max()) ||
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
!_finite(val);
#else
@@ -1679,7 +1679,7 @@ IcePy::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr&
for(Ice::Int i = 0; i < sz; ++i)
{
- void* cl = reinterpret_cast<void*>(i);
+ void* cl = reinterpret_cast<void*>(static_cast<Py_ssize_t>(i));
elementType->unmarshal(is, sm, result.get(), cl, false);
}
@@ -2335,7 +2335,7 @@ IcePy::SequenceInfo::SequenceMapping::SequenceMapping(const Ice::StringSeq& meta
void
IcePy::SequenceInfo::SequenceMapping::unmarshaled(PyObject* val, PyObject* target, void* closure)
{
- long i = reinterpret_cast<long>(closure);
+ Py_ssize_t i = reinterpret_cast<Py_ssize_t>(closure);
if(type == SEQ_DEFAULT || type == SEQ_LIST)
{
PyList_SET_ITEM(target, i, val);
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index b466b903923..d892088db82 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -1881,7 +1881,6 @@ def getTestEnv(lang, testdir):
if os.environ.get("USE_BIN_DIST", "no") != "yes":
addPathToEnv("NODE_PATH", os.path.join(getIceDir("js", testdir), "src"), env)
-
if isWin32() and lang in ["cpp", "java", "csharp", "python", "ruby", "php"]:
if not iceHome:
configuration = "Debug" if buildMode == "debug" else "Release"