Report error event when command stopped due to buffer overflow.
authorIan Abbott <abbotti@mev.co.uk>
Mon, 3 Dec 2007 14:47:00 +0000 (14:47 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 3 Dec 2007 14:47:00 +0000 (14:47 +0000)
comedi/drivers/amplc_dio200.c

index 7d5141e5722caa7b3af6dd4a1e5694227e256e3b..f461fc509edc0cfbbf4f32c3f618c277ba42cb10 100644 (file)
@@ -728,6 +728,9 @@ static int dio200_handle_read_intr(comedi_device * dev, comedi_subdevice * s)
                                } else {
                                        /* Error!  Stop acquisition.  */
                                        dio200_stop_intr(dev, s);
+                                       s->async->events |= COMEDI_CB_ERROR
+                                               | COMEDI_CB_OVERFLOW;
+                                       comedi_error(dev, "buffer overflow");
                                }
 
                                /* Check for end of acquisition. */