Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec2dcb00 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: update RpcState transact comments" am: 4d30a18e am:...

Merge "libbinder: update RpcState transact comments" am: 4d30a18e am: 9702b2dd am: e5bc37c8 am: 707cbc9d

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2457066



Change-Id: I1f6016ff1175c769e123069c1ebf0e974faa0e05
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f650743f 707cbc9d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -557,13 +557,12 @@ status_t RpcState::transactAddress(const sp<RpcSession::RpcConnection>& connecti
            .parcelDataSize = static_cast<uint32_t>(data.dataSize()),
    };

    constexpr size_t kWaitMaxUs = 1000000;
    constexpr size_t kWaitLogUs = 10000;
    size_t waitUs = 0;

    // Oneway calls have no sync point, so if many are sent before, whether this
    // is a twoway or oneway transaction, they may have filled up the socket.
    // So, make sure we drain them before polling
    constexpr size_t kWaitMaxUs = 1000000;
    constexpr size_t kWaitLogUs = 10000;
    size_t waitUs = 0;

    iovec iovs[]{
            {&command, sizeof(RpcWireHeader)},
@@ -591,8 +590,9 @@ status_t RpcState::transactAddress(const sp<RpcSession::RpcConnection>& connecti
                },
                rpcFields->mFds.get());
        status != OK) {
        // TODO(b/167966510): need to undo onBinderLeaving - we know the
        // refcount isn't successfully transferred.
        // rpcSend calls shutdownAndWait, so all refcounts should be reset. If we ever tolerate
        // errors here, then we may need to undo the binder-sent counts for the transaction as
        // well as for the binder objects in the Parcel
        return status;
    }