Browse Source

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

Steven Dake 16 years ago
parent
commit
2f24513d87
1 changed files with 4 additions and 0 deletions
  1. 4 0
      exec/coroipcs.c

+ 4 - 0
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);
 }