diff -r 8afa33692372 -r c767eabbaaac drivers/can_peak/can_peak.c --- a/drivers/can_peak/can_peak.c Fri Jun 16 14:44:23 2006 +0200 +++ b/drivers/can_peak/can_peak.c Mon Jun 19 14:19:23 2006 +0200 @@ -62,7 +62,10 @@ UNS8 data; TPCANMsg peakMsg; if ((errno = CAN_Read(((CANPort*)fd0)->fd, & peakMsg))) { // Blocks until no new message or error. - perror("!!! Peak board : error of reading. (from f_can_receive function) \n"); + if(errno != -EIDRM) // error is not "Can Port closed while reading" + { + perror("!!! Peak board : error of reading. (from f_can_receive function) \n"); + } return 1; } m->cob_id.w = peakMsg.ID; @@ -159,7 +162,7 @@ int canClose(CAN_HANDLE fd0) { CAN_Close(((CANPort*)fd0)->fd); + WaitReceiveTaskEnd(&((CANPort*)fd0)->receiveTask); ((CANPort*)fd0)->used = 0; - WaitReceiveTaskEnd(&((CANPort*)fd0)->receiveTask); return 0; }