close(socks_[RECEIVER]);
}
-int FdBroker::SocketPair::Request() {
+int FdBroker::SocketPair::Request(const std::string& target_appid,
+ const std::string& port_name) {
if (mock_) {
return socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, socks_);
}
- if (aul_rpc_port_create_socket_pair(&socks_) != AUL_R_OK) {
+ if (aul_rpc_port_create_socket_pair(target_appid.c_str(),
+ port_name.c_str(), &socks_) != AUL_R_OK) {
LOGE("error create socket pair");
return -1;
}
return -1;
}
- if (main_sock_pair.Request() != 0)
+ if (main_sock_pair.Request(target_appid, port_name) != 0)
return -1;
- if (delegate_sock_pair.Request() != 0)
+ if (delegate_sock_pair.Request(target_appid, port_name) != 0)
return -1;
if (mock_) {