diff options
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 755ff35781..d9341369fa 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -40,7 +40,7 @@ status_t RpcState::onBinderLeaving(const sp<RpcConnection>& connection, const sp // We need to be able to send instructions over the socket for how to // connect to a different server, and we also need to let the host // process know that this is happening. - ALOGE("Canot send binder from unrelated binder RPC connection."); + ALOGE("Cannot send binder from unrelated binder RPC connection."); return INVALID_OPERATION; } @@ -498,19 +498,20 @@ status_t RpcState::processTransactInternal(const base::unique_fd& fd, } } - Parcel data; - // transaction->data is owned by this function. Parcel borrows this data and - // only holds onto it for the duration of this function call. Parcel will be - // deleted before the 'transactionData' object. - data.ipcSetDataReference(transaction->data, - transactionData.size() - offsetof(RpcWireTransaction, data), - nullptr /*object*/, 0 /*objectCount*/, do_nothing_to_transact_data); - data.markForRpc(connection); - Parcel reply; reply.markForRpc(connection); if (replyStatus == OK) { + Parcel data; + // transaction->data is owned by this function. Parcel borrows this data and + // only holds onto it for the duration of this function call. Parcel will be + // deleted before the 'transactionData' object. + data.ipcSetDataReference(transaction->data, + transactionData.size() - offsetof(RpcWireTransaction, data), + nullptr /*object*/, 0 /*objectCount*/, + do_nothing_to_transact_data); + data.markForRpc(connection); + if (target) { replyStatus = target->transact(transaction->code, data, &reply, transaction->flags); } else { |