diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 61bdbc6aa..09238c2ca 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -36,7 +36,6 @@ #include -#include #include #include #include @@ -1281,22 +1280,11 @@ status_t Parcel::read(FlattenableHelperInterface& val) const status_t err = NO_ERROR; for (size_t i=0 ; ireadFileDescriptor(); - fds[i] = dup(oldfd); + fds[i] = dup(this->readFileDescriptor()); if (fds[i] < 0) { - int dupErrno = errno; err = BAD_VALUE; - int flags = fcntl(oldfd, F_GETFD); - int fcntlErrno = errno; - const flat_binder_object* flat = readObject(true); - ALOGE("dup failed in Parcel::read, fd %zu of %zu\n" - " dup(%d) = %d [errno: %d (%s)]\n" - " fcntl(%d, F_GETFD) = %d [errno: %d (%s)]\n" - " flat %p type %d", - i, fd_count, - oldfd, fds[i], dupErrno, strerror(dupErrno), - oldfd, flags, fcntlErrno, strerror(fcntlErrno), - flat, flat ? flat->type : 0); + ALOGE("dup() failed in Parcel::read, i is %zu, fds[i] is %d, fd_count is %zu, error: %s", + i, fds[i], fd_count, strerror(errno)); } }