diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-01-23 14:42:41 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-01-23 14:42:41 +0000 |
commit | 59e520bae09191f5cb317fd4a7fbe0e1e89515f1 (patch) | |
tree | 8595d43d698c05cb393009eb1a7fc6971a5aeb26 /cpp/src/slice2cppe/Gen.cpp | |
parent | Made batch auto-flush default (diff) | |
download | ice-59e520bae09191f5cb317fd4a7fbe0e1e89515f1.tar.bz2 ice-59e520bae09191f5cb317fd4a7fbe0e1e89515f1.tar.xz ice-59e520bae09191f5cb317fd4a7fbe0e1e89515f1.zip |
Fixed bug 1693
Diffstat (limited to 'cpp/src/slice2cppe/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 3c4966177fa..f4f4c341824 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -1503,6 +1503,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "int __cnt = 0;"; C << nl << "while(true)"; C << sb; + C << nl << "::Ice::ConnectionPtr __connection;"; C << nl << "try"; C << sb; if(p->returnsData()) @@ -1510,7 +1511,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "__checkTwowayOnly(\"" << name << "\");"; } C << nl << "static const ::std::string __operation(\"" << p->name() << "\");"; - C << nl << "::Ice::ConnectionPtr __connection = ice_getConnection();"; + C << nl << "__connection = ice_getConnection();"; C << nl << "::IceInternal::Outgoing __outS(__connection.get(), _reference.get(), __operation, " << operationModeToString(p->sendMode()) << ", __ctx);"; if(!inParams.empty()) @@ -1614,16 +1615,16 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << sb; if(p->mode() == Operation::Idempotent || p->mode() == Operation::Nonmutating) { - C << nl << "__handleExceptionWrapperRelaxed(__ex, __cnt);"; + C << nl << "__handleExceptionWrapperRelaxed(__connection, __ex, __cnt);"; } else { - C << nl << "__handleExceptionWrapper(__ex);"; + C << nl << "__handleExceptionWrapper(__connection, __ex);"; } C << eb; C << nl << "catch(const ::Ice::LocalException& __ex)"; C << sb; - C << nl << "__handleException(__ex, __cnt);"; + C << nl << "__handleException(__connection, __ex, __cnt);"; C << eb; C.zeroIndent(); |