diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-02-20 12:50:40 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-02-20 12:50:40 +0000 |
commit | 1d723e1927a7be26f242a6a0b58dac88b529f18c (patch) | |
tree | 0a69fe530968c45cbb1d785e23ef8a50dc5d0ce3 /cpp/src | |
parent | More socket timeout fixes (diff) | |
download | ice-1d723e1927a7be26f242a6a0b58dac88b529f18c.tar.bz2 ice-1d723e1927a7be26f242a6a0b58dac88b529f18c.tar.xz ice-1d723e1927a7be26f242a6a0b58dac88b529f18c.zip |
Fix thread safety issue
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2javae/Gen.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 85e3d119727..58c0d0dbcca 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -1425,17 +1425,17 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "__checkTwowayOnly(\"" << name << "\");"; } C << nl << "static const ::std::string __operation(\"" << p->name() << "\");"; - C << nl << "__checkConnection();"; + C << nl << "::Ice::ConnectionPtr __connection = ice_connection();"; C.zeroIndent(); C << nl << "#ifdef ICEE_BLOCKING_CLIENT"; C << nl << "# ifndef ICEE_PURE_BLOCKING_CLIENT"; C.restoreIndent(); - C << nl << "if(_connection->blocking())"; + C << nl << "if(__connection->blocking())"; C.zeroIndent(); C << nl << "# endif"; C.restoreIndent(); C << sb; - C << nl << "::IceInternal::Outgoing __out(_connection.get(), _reference.get(), __operation, " + C << nl << "::IceInternal::Outgoing __out(__connection.get(), _reference.get(), __operation, " << "static_cast< ::Ice::OperationMode>(" << p->mode() << "), __ctx);"; C << nl; if(ret) @@ -1454,7 +1454,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl << "#ifndef ICEE_PURE_BLOCKING_CLIENT"; C.restoreIndent(); C << sb; - C << nl << "::IceInternal::OutgoingM __out(_connection.get(), _reference.get(), __operation, " + C << nl << "::IceInternal::OutgoingM __out(__connection.get(), _reference.get(), __operation, " << "static_cast< ::Ice::OperationMode>(" << p->mode() << "), __ctx);"; C << nl; if(ret) diff --git a/cpp/src/slice2javae/Gen.cpp b/cpp/src/slice2javae/Gen.cpp index 9aa17daedda..8a6baaba8ef 100644 --- a/cpp/src/slice2javae/Gen.cpp +++ b/cpp/src/slice2javae/Gen.cpp @@ -2212,8 +2212,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) { out << nl << "__checkTwowayOnly(\"" << opName << "\");"; } - out << nl << "__checkConnection();"; - out << nl << "IceInternal.Outgoing __og = _connection.getOutgoing(_reference, \"" << op->name() << "\", " + out << nl << "Ice.Connection __connection = ice_connection();"; + out << nl << "IceInternal.Outgoing __og = __connection.getOutgoing(_reference, \"" << op->name() << "\", " << sliceModeToIceMode(op) << ", __ctx);"; out << nl << "try"; out << sb; @@ -2280,7 +2280,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; out << nl << "finally"; out << sb; - out << nl << "_connection.reclaimOutgoing(__og);"; + out << nl << "__connection.reclaimOutgoing(__og);"; out << eb; if(!ret) { |