summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Current.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-01-11 01:00:48 +0000
committerMark Spruiell <mes@zeroc.com>2005-01-11 01:00:48 +0000
commit5191594050c00254ad1d85287a1b5bfc1910b79e (patch)
tree2524ce2c7743980cba0c94cf61ac1a837b0c51ef /py/modules/IcePy/Current.cpp
parentAdded missing properties in System.Exception to list of mangled (diff)
downloadice-5191594050c00254ad1d85287a1b5bfc1910b79e.tar.bz2
ice-5191594050c00254ad1d85287a1b5bfc1910b79e.tar.xz
ice-5191594050c00254ad1d85287a1b5bfc1910b79e.zip
adding support for Ice::Connection
Diffstat (limited to 'py/modules/IcePy/Current.cpp')
-rw-r--r--py/modules/IcePy/Current.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/py/modules/IcePy/Current.cpp b/py/modules/IcePy/Current.cpp
index bc16cc3d083..8fa0b93add8 100644
--- a/py/modules/IcePy/Current.cpp
+++ b/py/modules/IcePy/Current.cpp
@@ -12,8 +12,10 @@
#endif
#include <Current.h>
#include <structmember.h>
+#include <Connection.h>
#include <ObjectAdapter.h>
#include <Util.h>
+#include <Ice/ObjectAdapter.h>
using namespace std;
using namespace IcePy;
@@ -137,7 +139,16 @@ currentGetter(CurrentObject* self, void* closure)
}
case CURRENT_CONNECTION:
{
- // TODO: Connection
+ if(self->con == NULL)
+ {
+ self->con = createConnection(self->current->con, self->current->adapter->getCommunicator());
+ if(self->con == NULL)
+ {
+ return NULL;
+ }
+ }
+ Py_INCREF(self->con);
+ result = self->con;
break;
}
case CURRENT_ID: