From b39a8272f520017a95617ffeb504575098eb4b25 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Thu, 5 Aug 2010 15:17:15 -0700 Subject: 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 --- libs/rs/rsContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/rs/rsContext.cpp') 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; } -- cgit v1.2.3-59-g8ed1b