[rpc_binder] Rename existing rpc_server to vsock_rpc_server
Bug: 253199844
Test: atest MicrodroidTests MicrodroidBenchmarks
Change-Id: Ifa612724276347abe1faba0df96b6e2d32d31ca6
diff --git a/authfs/fd_server/src/main.rs b/authfs/fd_server/src/main.rs
index 93a788b..f1fffdd 100644
--- a/authfs/fd_server/src/main.rs
+++ b/authfs/fd_server/src/main.rs
@@ -29,7 +29,7 @@
use clap::Parser;
use log::debug;
use nix::sys::stat::{umask, Mode};
-use rpcbinder::run_rpc_server;
+use rpcbinder::run_vsock_rpc_server;
use std::collections::BTreeMap;
use std::fs::File;
use std::os::unix::io::{FromRawFd, OwnedFd};
@@ -137,7 +137,7 @@
let service = FdService::new_binder(fd_pool).as_binder();
debug!("fd_server is starting as a rpc service.");
- let retval = run_rpc_server(service, RPC_SERVICE_PORT, || {
+ let retval = run_vsock_rpc_server(service, RPC_SERVICE_PORT, || {
debug!("fd_server is ready");
// Close the ready-fd if we were given one to signal our readiness.
drop(ready_fd.take());
diff --git a/compos/src/compsvc_main.rs b/compos/src/compsvc_main.rs
index 991725d..a4e3903 100644
--- a/compos/src/compsvc_main.rs
+++ b/compos/src/compsvc_main.rs
@@ -25,7 +25,7 @@
use anyhow::{bail, Result};
use compos_common::COMPOS_VSOCK_PORT;
use log::{debug, error};
-use rpcbinder::run_rpc_server;
+use rpcbinder::run_vsock_rpc_server;
use std::panic;
use vm_payload_bindgen::AVmPayload_notifyPayloadReady;
@@ -48,7 +48,7 @@
let service = compsvc::new_binder()?.as_binder();
debug!("compsvc is starting as a rpc service.");
// SAFETY: Invokes a method from the bindgen library `vm_payload_bindgen`.
- let retval = run_rpc_server(service, COMPOS_VSOCK_PORT, || unsafe {
+ let retval = run_vsock_rpc_server(service, COMPOS_VSOCK_PORT, || unsafe {
AVmPayload_notifyPayloadReady();
});
if retval {
diff --git a/tests/benchmark/src/native/benchmarkbinary.cpp b/tests/benchmark/src/native/benchmarkbinary.cpp
index 4e3c14d..33da1dc 100644
--- a/tests/benchmark/src/native/benchmarkbinary.cpp
+++ b/tests/benchmark/src/native/benchmarkbinary.cpp
@@ -164,8 +164,8 @@
}
};
- if (!RunRpcServerCallback(test_service->asBinder().get(), test_service->SERVICE_PORT, callback,
- nullptr)) {
+ if (!RunVsockRpcServerCallback(test_service->asBinder().get(), test_service->SERVICE_PORT,
+ callback, nullptr)) {
return Error() << "RPC Server failed to run";
}
return {};
diff --git a/tests/testapk/src/native/testbinary.cpp b/tests/testapk/src/native/testbinary.cpp
index 003aca8..9ba0619 100644
--- a/tests/testapk/src/native/testbinary.cpp
+++ b/tests/testapk/src/native/testbinary.cpp
@@ -121,8 +121,8 @@
abort();
}
};
- if (!RunRpcServerCallback(testService->asBinder().get(), testService->SERVICE_PORT, callback,
- nullptr)) {
+ if (!RunVsockRpcServerCallback(testService->asBinder().get(), testService->SERVICE_PORT,
+ callback, nullptr)) {
return Error() << "RPC Server failed to run";
}
diff --git a/virtualizationservice/src/aidl.rs b/virtualizationservice/src/aidl.rs
index eb2bac4..26ae242 100644
--- a/virtualizationservice/src/aidl.rs
+++ b/virtualizationservice/src/aidl.rs
@@ -57,7 +57,7 @@
use disk::QcowFile;
use log::{debug, error, info, warn};
use microdroid_payload_config::{OsConfig, Task, TaskType, VmPayloadConfig};
-use rpcbinder::run_rpc_server_with_factory;
+use rpcbinder::run_vsock_rpc_server_with_factory;
use rustutils::system_properties;
use semver::VersionReq;
use std::convert::TryInto;
@@ -320,7 +320,7 @@
let state = service.state.clone();
std::thread::spawn(move || {
debug!("VirtualMachineService is starting as an RPC service.");
- if run_rpc_server_with_factory(VM_BINDER_SERVICE_PORT as u32, |cid| {
+ if run_vsock_rpc_server_with_factory(VM_BINDER_SERVICE_PORT as u32, |cid| {
VirtualMachineService::factory(cid, &state)
}) {
debug!("RPC server has shut down gracefully");