libbinder: RPC use 'status_t' over 'bool'
For ease of debugging/handling errors (I realized that binderRpcTest
currently crashes on Pixel 3 because of some missing kernel patches -
this would have been easier with this, and one potential (even if
temporary) solution would be to check the return code).
Bug: 167966510
Test: binderRpcTest, binderRpcBenchmark, binder_parcel_fuzzer,
binder_rpc_fuzzer, binderHostDeviceTest
Change-Id: I1baa2e9380e0ec8f82f8ceb250f3eeb632dc5fbc
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 628381c..d3eef4e 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -555,7 +555,9 @@
return status;
}
rpcServer->setRootObjectWeak(weakThis);
- rpcServer->setupExternalServer(std::move(socketFd));
+ if (auto status = rpcServer->setupExternalServer(std::move(socketFd)); status != OK) {
+ return status;
+ }
rpcServer->setMaxThreads(binderThreadPoolMaxCount);
rpcServer->start();
e->mRpcServerLinks.emplace(link);