diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-05-07 16:19:20 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-05-07 16:19:20 +0000 |
commit | 7b03ec4515e6441de72deaf8f404d03c9876ab4f (patch) | |
tree | 9a0e3b6df5e1c5b3e7bdb4519676b9c5e5a9c094 /cpp/src/slice2cpp | |
parent | First step of Mono port. Everything compiles, but not all tests run. (diff) | |
download | ice-7b03ec4515e6441de72deaf8f404d03c9876ab4f.tar.bz2 ice-7b03ec4515e6441de72deaf8f404d03c9876ab4f.tar.xz ice-7b03ec4515e6441de72deaf8f404d03c9876ab4f.zip |
fixing AMI bug with routers
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index e7420e41f62..cfb4b07dd70 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1251,7 +1251,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << sb; // Async requests may only be sent twoway. C << nl << "__checkTwowayOnly(\"" << p->name() << "\");"; - C << nl << "__cb->__invoke" << spar << "__reference()" << argsAMI << "__ctx" << epar << ';'; + C << nl << "__cb->__invoke" << spar << "this" << argsAMI << "__ctx" << epar << ';'; C << eb; } } @@ -3341,11 +3341,13 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) string name = fixKwd(p->name()); - string classNameAMI = "AMI_" + fixKwd(cl->name()); - string classNameAMD = "AMD_" + fixKwd(cl->name()); + string className = fixKwd(cl->name()); + string classNameAMI = "AMI_" + className; + string classNameAMD = "AMD_" + className; string classScope = fixKwd(cl->scope()); string classScopedAMI = classScope + classNameAMI; string classScopedAMD = classScope + classNameAMD; + string proxyName = classScope + className + "Prx"; vector<string> params; vector<string> paramsDecl; @@ -3354,8 +3356,8 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) vector<string> paramsInvoke; vector<string> paramsDeclInvoke; - paramsInvoke.push_back("const ::IceInternal::ReferencePtr&"); - paramsDeclInvoke.push_back("const ::IceInternal::ReferencePtr& __ref"); + paramsInvoke.push_back("const " + proxyName + "&"); + paramsDeclInvoke.push_back("const " + proxyName + "& __prx"); TypePtr ret = p->returnType(); string retS = inputTypeToString(ret); @@ -3425,7 +3427,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) C << nl << "try"; C << sb; C << nl << "static const ::std::string __operation(\"" << p->name() << "\");"; - C << nl << "__prepare(__ref, __operation, static_cast< ::Ice::OperationMode>(" << p->mode() << "), __ctx);"; + C << nl << "__prepare(__prx, __operation, static_cast< ::Ice::OperationMode>(" << p->mode() << "), __ctx);"; writeMarshalCode(C, inParams, 0); if(p->sendsClasses()) { |