summaryrefslogtreecommitdiff
path: root/libqservice
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-03-06 19:30:03 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-03-06 19:30:03 -0800
commita708f5b22a88cebd0cbce1a0f3758859e4ffadff (patch)
tree28fdae691ba61e819824053341c494f5f0b52b40 /libqservice
parent4ea05490a5f2e4e3e3f5570c3071b02e7c9b7c86 (diff)
parent1799cb4eeb8728431d3cdb02b0dba98f7a2ad364 (diff)
downloaddisplay-a708f5b22a88cebd0cbce1a0f3758859e4ffadff.tar.gz
Merge "QService: Fix binder out-parcel position as well"
Diffstat (limited to 'libqservice')
-rw-r--r--libqservice/QService.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libqservice/QService.cpp b/libqservice/QService.cpp
index 52766953..ddb4b182 100644
--- a/libqservice/QService.cpp
+++ b/libqservice/QService.cpp
@@ -64,11 +64,15 @@ status_t QService::dispatch(uint32_t command, const Parcel* inParcel,
status_t err = (status_t) FAILED_TRANSACTION;
IPCThreadState* ipc = IPCThreadState::self();
//Rewind parcel in case we're calling from the same process
- if (ipc->getCallingPid() == getpid())
+ bool sameProcess = (ipc->getCallingPid() == getpid());
+ if(sameProcess)
inParcel->setDataPosition(0);
if (mClient.get()) {
ALOGD_IF(QSERVICE_DEBUG, "Dispatching command: %d", command);
err = mClient->notifyCallback(command, inParcel, outParcel);
+ //Rewind parcel in case we're calling from the same process
+ if (sameProcess)
+ outParcel->setDataPosition(0);
}
return err;
}