From b1287e5da5315f7512a633c1d27a76cf559f0c24 Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Sat, 30 Aug 2008 13:03:58 +0000 Subject: [PATCH] * the condition should not have change, thanks Stephan for pointing this out :) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27239 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/LinkSender.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/app/LinkSender.cpp b/src/kits/app/LinkSender.cpp index 8d3dd91f74..6893cdc3cf 100644 --- a/src/kits/app/LinkSender.cpp +++ b/src/kits/app/LinkSender.cpp @@ -67,7 +67,7 @@ LinkSender::StartMessage(int32 code, size_t minSize) if (EndMessage() < B_OK) CancelMessage(); - if (minSize >= kMaxBufferSize) { + if (minSize > kMaxBufferSize - sizeof(message_header) { // we will handle this case in Attach, using an area minSize = sizeof(area_id); } @@ -117,7 +117,7 @@ LinkSender::EndMessage(bool needsReply) STRACE(("info: LinkSender EndMessage() of size %ld.\n", header->size)); // bump to start of next message - fCurrentStart = fCurrentEnd; + fCurrentStart = fCurrentEnd; return B_OK; } @@ -220,7 +220,7 @@ LinkSender::AdjustBuffer(size_t newSize, char **_oldBuffer) return B_BUFFER_OVERFLOW; else if (newSize > kInitialBufferSize) newSize = (newSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1); - + if (newSize == fBufferSize) { // keep existing buffer if (_oldBuffer)