summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-01-15 17:59:10 +0000
committerMarc Laukien <marc@zeroc.com>2002-01-15 17:59:10 +0000
commit18752297f2d74b09bec84b1bf8ef10c2c89e00fb (patch)
tree9ae5e01fabf39c3a8f886297b44d4696f3db4bdb /cpp/src
parentcallback demo (diff)
downloadice-18752297f2d74b09bec84b1bf8ef10c2c89e00fb.tar.bz2
ice-18752297f2d74b09bec84b1bf8ef10c2c89e00fb.tar.xz
ice-18752297f2d74b09bec84b1bf8ef10c2c89e00fb.zip
_fwd stuff
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier/ClientBlobject.cpp44
-rw-r--r--cpp/src/Glacier/ServerBlobject.cpp42
-rw-r--r--cpp/src/Ice/Incoming.cpp1
3 files changed, 81 insertions, 6 deletions
diff --git a/cpp/src/Glacier/ClientBlobject.cpp b/cpp/src/Glacier/ClientBlobject.cpp
index 5d956bb984a..9cd92e4a459 100644
--- a/cpp/src/Glacier/ClientBlobject.cpp
+++ b/cpp/src/Glacier/ClientBlobject.cpp
@@ -59,10 +59,48 @@ Glacier::ClientBlobject::ice_invoke(const std::vector<Byte>& inParams, std::vect
{
proxy = proxy->ice_newFacet(current.facet);
}
-
- if (!current.response)
+
+ Context::const_iterator p = current.context.find("_fwd");
+ if (p != current.context.end())
{
- proxy = proxy->ice_oneway();
+ for (unsigned int i = 0; i < p->second.length(); ++i)
+ {
+ char option = p->second[i];
+ switch (option)
+ {
+ case 't':
+ {
+ proxy = proxy->ice_twoway();
+ break;
+ }
+
+ case 'o':
+ {
+ proxy = proxy->ice_oneway();
+ break;
+ }
+
+ case 'd':
+ {
+ proxy = proxy->ice_datagram();
+ break;
+ }
+
+ case 's':
+ {
+ proxy = proxy->ice_secure(true);
+ break;
+ }
+
+ default:
+ {
+ ostringstream s;
+ s << "unknown forward option `" << option << "'";
+ _logger->warning(s.str());
+ break;
+ }
+ }
+ }
}
if (_traceLevel >= 2)
diff --git a/cpp/src/Glacier/ServerBlobject.cpp b/cpp/src/Glacier/ServerBlobject.cpp
index cf9055387a2..16d3ae71c01 100644
--- a/cpp/src/Glacier/ServerBlobject.cpp
+++ b/cpp/src/Glacier/ServerBlobject.cpp
@@ -53,9 +53,47 @@ Glacier::ServerBlobject::ice_invoke(const std::vector<Byte>& inParams, std::vect
proxy = proxy->ice_newFacet(current.facet);
}
- if (!current.response)
+ Context::const_iterator p = current.context.find("_fwd");
+ if (p != current.context.end())
{
- proxy = proxy->ice_oneway();
+ for (unsigned int i = 0; i < p->second.length(); ++i)
+ {
+ char option = p->second[i];
+ switch (option)
+ {
+ case 't':
+ {
+ proxy = proxy->ice_twoway();
+ break;
+ }
+
+ case 'o':
+ {
+ proxy = proxy->ice_oneway();
+ break;
+ }
+
+ case 'd':
+ {
+ proxy = proxy->ice_datagram();
+ break;
+ }
+
+ case 's':
+ {
+ proxy = proxy->ice_secure(true);
+ break;
+ }
+
+ default:
+ {
+ ostringstream s;
+ s << "unknown forward option `" << option << "'";
+ _logger->warning(s.str());
+ break;
+ }
+ }
+ }
}
if (_traceLevel >= 2)
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 4a614ed2203..17863d0fcd5 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -29,7 +29,6 @@ void
IceInternal::Incoming::invoke(bool response)
{
Current current;
- current.response = response;
current.identity.__read(&_is);
_is.read(current.facet);
_is.read(current.operation);