summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ProxyFactory.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-09 03:52:35 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-09 03:52:35 +0000
commit479148a990da6e9aaaffd1bf94b242168db6f422 (patch)
tree45bf87df3b36d2d70eede413b5e0188c154825de /cpp/src/Ice/ProxyFactory.cpp
parentfixes (diff)
downloadice-479148a990da6e9aaaffd1bf94b242168db6f422.tar.bz2
ice-479148a990da6e9aaaffd1bf94b242168db6f422.tar.xz
ice-479148a990da6e9aaaffd1bf94b242168db6f422.zip
fixes
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index eacfce7e27c..10cfc0dcba6 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -38,18 +38,16 @@ IceInternal::ProxyFactory::proxyToString(const ObjectPrx& proxy)
ObjectPrx
IceInternal::ProxyFactory::streamToProxy(Stream* s)
{
- Stream::Container::iterator i = s->i;
string identity;
s->read(identity);
- if (identity.length() == 0)
+ if (identity.length())
{
- return 0;
+ ReferencePtr reference = new Reference(identity, s);
+ return referenceToProxy(reference);
}
else
{
- s->i = i;
- ReferencePtr reference = new Reference(s);
- return referenceToProxy(reference);
+ return 0;
}
}
@@ -66,6 +64,7 @@ IceInternal::ProxyFactory::proxyToStream(const ObjectPrx& proxy, Stream* s)
{
if (proxy)
{
+ s->write(proxy->__reference()->identity);
proxy->__reference()->streamWrite(s);
}
else