Fixed problems in can_virtual, loop when closing pipes.
authoretisserant
Sat, 12 May 2007 23:06:43 +0200
changeset 193 0487270d441c
parent 192 9dd6f17ef7e5
child 194 90d740ff7c21
Fixed problems in can_virtual, loop when closing pipes.
drivers/can_virtual/can_virtual.c
--- a/drivers/can_virtual/can_virtual.c	Sat May 12 22:43:30 2007 +0200
+++ b/drivers/can_virtual/can_virtual.c	Sat May 12 23:06:43 2007 +0200
@@ -42,7 +42,7 @@
 /*********functions which permit to communicate with the board****************/
 UNS8 canReceive_driver(CAN_HANDLE fd0, Message *m)
 {
-	if(read(((CANPipe*)fd0)->pipe[0], m, sizeof(Message)) < sizeof(Message))
+	if(read(((CANPipe*)fd0)->pipe[0], m, sizeof(Message)) != (ssize_t)sizeof(Message))
 	{
 		return 1;
 	}