From 7c9ac03d0c949e984a8f92947da363d022d6e120 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 15 Sep 2021 13:54:34 +0900 Subject: [PATCH] Fix a bug about C++ Generator The parameter of the OnConnected() is "const char*". Change-Id: Ie2ccc476013d4bc8f3aed71bac90fdc98562cacd Signed-off-by: Hwankyu Jhun --- idlc/gen/cpp_stub_body_gen_cb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idlc/gen/cpp_stub_body_gen_cb.h b/idlc/gen/cpp_stub_body_gen_cb.h index ee8959f..3bcac51 100644 --- a/idlc/gen/cpp_stub_body_gen_cb.h +++ b/idlc/gen/cpp_stub_body_gen_cb.h @@ -60,7 +60,7 @@ void ##::OnConnectedCB(const char* sender, const char* instance, void* data) { auto s = stub->service_factory_->CreateService(sender, instance); rpc_port_h port; - int ret = rpc_port_stub_get_port(stub->stub_, RPC_PORT_PORT_CALLBACK, instance.c_str(), &port); + int ret = rpc_port_stub_get_port(stub->stub_, RPC_PORT_PORT_CALLBACK, instance, &port); if (ret != RPC_PORT_ERROR_NONE) { _E("Failed to get the port(%d)", ret); return; -- 2.7.4