Stop running on error conditions.
authorDavid Schleef <ds@schleef.org>
Thu, 25 Jul 2002 23:33:20 +0000 (23:33 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 25 Jul 2002 23:33:20 +0000 (23:33 +0000)
comedi/comedi_fops.c

index 3f9434ba1bfcd43b984a1685bb8f90b782d4bb15..46ba591ad16d77fb4d1506d05e607d309411c9bd 100644 (file)
@@ -1791,13 +1791,13 @@ void comedi_event(comedi_device *dev,comedi_subdevice *s, unsigned int mask)
        if( (s->subdev_flags & SDF_RUNNING) == 0)
                return;
 
-       if(mask&COMEDI_CB_EOA){
+       if(mask&(COMEDI_CB_EOA|COMEDI_CB_ERROR|COMEDI_CB_OVERFLOW)){
                s->subdev_flags &= ~SDF_RUNNING;
        }
 
        /* remember if an error event has occured, so an error
         * can be returned the next time the user does a read() */
-       if(mask & COMEDI_CB_ERROR){
+       if(mask & (COMEDI_CB_ERROR|COMEDI_CB_OVERFLOW)){
                s->runflags |= SRF_ERROR;
        }
        if(async->cb_mask&mask){