summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2010-08-05 15:17:15 -0700
committer Jason Sams <rjsams@android.com> 2010-08-05 15:17:15 -0700
commitb39a8272f520017a95617ffeb504575098eb4b25 (patch)
tree14fbb2824260e17933f74bfd0a8272d2ffb8b790
parent2184abfead330a209a9c15eb80d214d0b5985ebb (diff)
Fix behavior where the non-blocking sendToCliend would block
when there was enough room for the message but not the message header. Change-Id: I600db04b91e76fa7966c7d8a98e5c56593e1806d
-rw-r--r--libs/rs/rsContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index dfdeb98c99bc..2a94651fb13f 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -798,7 +798,7 @@ bool Context::sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool w
return false;
}
if (!waitForSpace) {
- if (mIO.mToClient.getFreeSpace() < len) {
+ if (mIO.mToClient.getFreeSpace() <= (len + 8)) {
// Not enough room, and not waiting.
return false;
}