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

Commit 2fb4301a authored by Andrei Homescu's avatar Andrei Homescu
Browse files

libbinder: return error correctly in RpcTransportTipcAndroid

The callback passed to interruptableReadOrWrite is expected
to emulate read() so it should return -1 on error and set errno.
This fixes the RpcTransportTipcAndroid implementation to do
that instead of returning the error directly.

Bug: 224644083
Test: presubmit
Change-Id: I486bb8db2abc4c519ebce3f4f9c0ec8741f69ff4
parent a858b0ea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -103,7 +103,10 @@ public:
            // read and call readFn as many times as needed to get all the data
            status_t ret = fillReadBuffer();
            if (ret != OK) {
                return ret;
                // We need to emulate a Linux read call, which sets errno on
                // error and returns -1
                errno = -ret;
                return -1;
            }

            ssize_t processSize = 0;