diff options
author | 2021-07-26 15:26:12 -0700 | |
---|---|---|
committer | 2021-07-27 13:46:10 -0700 | |
commit | bf57bcef60c2619e07e5dad6deda336e6dde8626 (patch) | |
tree | 9c86f5cb95937e67c3d43558ad2519a879b0263e /libs/binder/RpcState.cpp | |
parent | 4068ef232a1dbeeab3895db27ae4f0fd5997e51a (diff) |
libbinder: RPC binder - incl. protocol version
Bug: 182938972
Test: binderRpcTest
Change-Id: I135fa44b111d92b53161775dea90a42e4cb5bee1
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 332c75f9e7..f3406bb10b 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -315,6 +315,18 @@ status_t RpcState::rpcRec(const sp<RpcSession::RpcConnection>& connection, return OK; } +status_t RpcState::readNewSessionResponse(const sp<RpcSession::RpcConnection>& connection, + const sp<RpcSession>& session, uint32_t* version) { + RpcNewSessionResponse response; + if (status_t status = + rpcRec(connection, session, "new session response", &response, sizeof(response)); + status != OK) { + return status; + } + *version = response.version; + return OK; +} + status_t RpcState::sendConnectionInit(const sp<RpcSession::RpcConnection>& connection, const sp<RpcSession>& session) { RpcOutgoingConnectionInit init{ |