summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2021-10-01 03:36:39 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-10-01 03:36:39 +0000
commitb910fdcaeeb1fca6505c522b4008be93bb921c82 (patch)
tree6e067695a9adf3d4a9e09d30d07b1f8556c97a05 /libs/binder/RpcState.cpp
parent5ea480565b4f74814de417df60b5a6cb1c149570 (diff)
parent0204dcc52e85012435271c2bcad001b83761f25f (diff)
Merge "libbinder: RPC simplify flush commands" am: 0204dcc52e
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1842873 Change-Id: Ib82cfbb10a93c18e8cb6de0f6860d675441d4ca4
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index b5c6cb091c..ef62f20d9a 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -885,12 +885,6 @@ processTransactInternalTailCall:
}
}
- // Binder refs are flushed for oneway calls only after all calls which are
- // built up are executed. Otherwise, they fill up the binder buffer.
- if (addr != 0 && replyStatus == OK && !oneway) {
- replyStatus = flushExcessBinderRefs(session, addr, target);
- }
-
if (oneway) {
if (replyStatus != OK) {
ALOGW("Oneway call failed with error: %d", replyStatus);
@@ -950,6 +944,12 @@ processTransactInternalTailCall:
return OK;
}
+ // Binder refs are flushed for oneway calls only after all calls which are
+ // built up are executed. Otherwise, they fill up the binder buffer.
+ if (addr != 0 && replyStatus == OK) {
+ replyStatus = flushExcessBinderRefs(session, addr, target);
+ }
+
LOG_ALWAYS_FATAL_IF(std::numeric_limits<int32_t>::max() - sizeof(RpcWireHeader) -
sizeof(RpcWireReply) <
reply.dataSize(),