From 2f24513d874d67da113acb8ff87cc0d279f8ec46 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sat, 30 Jan 2010 23:02:40 +0000 Subject: [PATCH] Fix coroipcs message corruption that occurs when a message fills the remainder of the dispatch buffer with a full message. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2650 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/coroipcs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index a0ef1332..0476202f 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -1179,6 +1179,10 @@ static int shared_mem_dispatch_bytes_left (const struct conn_info *conn_info) } else { bytes_left = n_read - n_write; } + if (bytes_left > 0) { + bytes_left--; + } + return (bytes_left); }