summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Communicator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r--py/modules/IcePy/Communicator.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp
index a8267dae0a0..223cfcde993 100644
--- a/py/modules/IcePy/Communicator.cpp
+++ b/py/modules/IcePy/Communicator.cpp
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -183,7 +183,7 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/)
//
// Remaining command line options are passed to the communicator
- // as an argument vector in case they contain plugin properties.
+ // as an argument vector in case they contain plug-in properties.
//
int argc = static_cast<int>(seq.size());
char** argv = new char*[argc + 1];
@@ -453,6 +453,10 @@ communicatorStringToProxy(CommunicatorObject* self, PyObject* args)
try
{
proxy = (*self->communicator)->stringToProxy(str);
+ if(proxy)
+ {
+ return createProxy(proxy, *self->communicator);
+ }
}
catch(const Ice::Exception& ex)
{
@@ -460,7 +464,8 @@ communicatorStringToProxy(CommunicatorObject* self, PyObject* args)
return 0;
}
- return createProxy(proxy, *self->communicator);
+ Py_INCREF(Py_None);
+ return Py_None;
}
#ifdef WIN32
@@ -515,6 +520,10 @@ communicatorPropertyToProxy(CommunicatorObject* self, PyObject* args)
try
{
proxy = (*self->communicator)->propertyToProxy(str);
+ if(proxy)
+ {
+ return createProxy(proxy, *self->communicator);
+ }
}
catch(const Ice::Exception& ex)
{
@@ -522,7 +531,8 @@ communicatorPropertyToProxy(CommunicatorObject* self, PyObject* args)
return 0;
}
- return createProxy(proxy, *self->communicator);
+ Py_INCREF(Py_None);
+ return Py_None;
}
#ifdef WIN32
@@ -857,7 +867,8 @@ communicatorGetImplicitContext(CommunicatorObject* self)
if(implicitContext == 0)
{
- return 0;
+ Py_INCREF(Py_None);
+ return Py_None;
}
return createImplicitContext(implicitContext);