summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-09-27 16:05:24 -0700
committer Steven Moreland <smoreland@google.com> 2021-09-27 16:06:23 -0700
commit3903bf05673ad06a09069889d1c0487a68bca801 (patch)
tree863052ccf10a1638da01e365d5258d5a637fc5cb /libs/binder/RpcState.cpp
parentd8083310534b157c7e303083df15fe9b362e4913 (diff)
libbinder: RPC simpl transactAddressInternal
Merge two variables here which are always holding the same value (at least in the oneway call case). Bug: N/A Test: binderRpcTest Change-Id: I2244c97244a777a0f17397447e9d6b5816c80b7b
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 1df94a66f3..5bf6bb77f1 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -719,7 +719,7 @@ status_t RpcState::processTransactInternal(const sp<RpcSession::RpcConnection>&
// for 'recursive' calls to this, we have already read and processed the
// binder from the transaction data and taken reference counts into account,
// so it is cached here.
- sp<IBinder> targetRef;
+ sp<IBinder> target;
processTransactInternalTailCall:
if (transactionData.size() < sizeof(RpcWireTransaction)) {
@@ -734,12 +734,9 @@ processTransactInternalTailCall:
bool oneway = transaction->flags & IBinder::FLAG_ONEWAY;
status_t replyStatus = OK;
- sp<IBinder> target;
if (addr != 0) {
- if (!targetRef) {
+ if (!target) {
replyStatus = onBinderEntering(session, addr, &target);
- } else {
- target = targetRef;
}
if (replyStatus != OK) {
@@ -906,7 +903,8 @@ processTransactInternalTailCall:
// reset up arguments
transactionData = std::move(todo.data);
- targetRef = std::move(todo.ref);
+ LOG_ALWAYS_FATAL_IF(target != todo.ref,
+ "async list should be associated with a binder");
it->second.asyncTodo.pop();
goto processTransactInternalTailCall;