summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/binder/Parcel.cpp1
-rw-r--r--libs/binder/RpcSession.cpp6
-rw-r--r--libs/binder/RpcState.cpp2
-rw-r--r--libs/binder/include/binder/RpcServer.h2
-rw-r--r--libs/binder/include/binder/RpcSession.h5
5 files changed, 8 insertions, 8 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 232a70c894..ebba375a79 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -206,6 +206,7 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) {
status_t status = writeInt32(1); // non-null
if (status != OK) return status;
RpcAddress address = RpcAddress::zero();
+ // TODO(b/167966510): need to undo this if the Parcel is not sent
status = mSession->state()->onBinderLeaving(mSession, binder, &address);
if (status != OK) return status;
status = address.writeToParcel(this);
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index 62118ffddc..de9aa220f8 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -296,7 +296,7 @@ bool RpcSession::setupSocketClient(const RpcSocketAddress& addr) {
if (!setupOneSocketConnection(addr, RPC_SESSION_ID_NEW, false /*reverse*/)) return false;
- // TODO(b/185167543): we should add additional sessions dynamically
+ // TODO(b/189955605): we should add additional sessions dynamically
// instead of all at once.
// TODO(b/186470974): first risk of blocking
size_t numThreadsAvailable;
@@ -314,11 +314,11 @@ bool RpcSession::setupSocketClient(const RpcSocketAddress& addr) {
// we've already setup one client
for (size_t i = 0; i + 1 < numThreadsAvailable; i++) {
- // TODO(b/185167543): shutdown existing connections?
+ // TODO(b/189955605): shutdown existing connections?
if (!setupOneSocketConnection(addr, mId.value(), false /*reverse*/)) return false;
}
- // TODO(b/185167543): we should add additional sessions dynamically
+ // TODO(b/189955605): we should add additional sessions dynamically
// instead of all at once - the other side should be responsible for setting
// up additional connections. We need to create at least one (unless 0 are
// requested to be set) in order to allow the other side to reliably make
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 3113841d27..6899981e83 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -400,6 +400,8 @@ status_t RpcState::transactAddress(const base::unique_fd& fd, const RpcAddress&
if (status_t status =
rpcSend(fd, session, "transaction", transactionData.data(), transactionData.size());
status != OK)
+ // TODO(b/167966510): need to undo onBinderLeaving - we know the
+ // refcount isn't successfully transferred.
return status;
if (flags & IBinder::FLAG_ONEWAY) {
diff --git a/libs/binder/include/binder/RpcServer.h b/libs/binder/include/binder/RpcServer.h
index b88bf5091b..4e6934b276 100644
--- a/libs/binder/include/binder/RpcServer.h
+++ b/libs/binder/include/binder/RpcServer.h
@@ -97,7 +97,7 @@ public:
*
* If this is not specified, this will be a single-threaded server.
*
- * TODO(b/185167543): these are currently created per client, but these
+ * TODO(b/167966510): these are currently created per client, but these
* should be shared.
*/
void setMaxThreads(size_t threads);
diff --git a/libs/binder/include/binder/RpcSession.h b/libs/binder/include/binder/RpcSession.h
index 7aa6d021e7..4650cf21ca 100644
--- a/libs/binder/include/binder/RpcSession.h
+++ b/libs/binder/include/binder/RpcSession.h
@@ -54,7 +54,7 @@ public:
* If this is called, 'shutdown' on this session must also be called.
* Otherwise, a threadpool will leak.
*
- * TODO(b/185167543): start these dynamically
+ * TODO(b/189955605): start these dynamically
*/
void setMaxThreads(size_t threads);
size_t getMaxThreads();
@@ -273,9 +273,6 @@ private:
size_t mClientConnectionsOffset = 0;
std::vector<sp<RpcConnection>> mClientConnections;
std::vector<sp<RpcConnection>> mServerConnections;
-
- // TODO(b/185167543): allow sharing between different sessions in a
- // process? (or combine with mServerConnections)
std::map<std::thread::id, std::thread> mThreads;
};