Fix Cpp generator 45/203845/2
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 18 Apr 2019 05:55:42 +0000 (14:55 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 18 Apr 2019 06:13:58 +0000 (15:13 +0900)
Change-Id: Ibea49643bef5a2c424e8eeee9db3e307c9ba46f8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
idlc/cpp_gen/cpp_gen_base_cb.h
idlc/cpp_gen/cpp_stub_body_gen.cc
idlc/cpp_gen/cpp_stub_body_gen_cb.h

index c1ad093546e470d6e29da88c2eda4b0673e335b6..dccfe377b0f1dfe5c7dccbb5c3c06f9286e53fba 100644 (file)
@@ -200,7 +200,7 @@ void $$::$$::Invoke($$) {
   p << *this;
 $$
   // Send
-  rpc_port_parcel_send(p, port_);
+  set_last_result(rpc_port_parcel_send(p, port_));
   rpc_port_parcel_destroy(p);
   valid_ = false;
 }
index 8ebf7deac8dcc4c20ff03f62eff8a30925cb7dde..b287f282f3123a3fa34eaf255bd5f0004763844e 100644 (file)
@@ -217,7 +217,7 @@ void CppStubBodyGen::GenInvocation(std::ofstream& stream,
     m += ConvertTypeToSerializer(decl.GetType(), "retVal", "result");
   }
 
-  m += "rpc_port_parcel_send(result, port);\n";
+  m += "ret = rpc_port_parcel_send(result, port);\n";
   stream << AddIndent(TAB_SIZE * 3, m);
 }
 
index 3ca0cc1fc21e8b8f853ecb9459113169fb6feebc..d3fad119ad2d44333e311af5750bcd51f1ace26a 100644 (file)
@@ -128,7 +128,7 @@ R"__cpp_cb(    default:
   rpc_port_parcel_destroy(p);
   rpc_port_parcel_destroy(result);
 
-  return 0;
+  return ret;
 }
 )__cpp_cb";