added comedi_buf_read_free() call to comedi_set_user_int_count()
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 20 Feb 2003 01:00:33 +0000 (01:00 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 20 Feb 2003 01:00:33 +0000 (01:00 +0000)
comedi/kcomedilib/get.c

index 4a93d5fad8bf5677d1c57bb228d78b0dd25671a5..c4cb7d4e97d63c73b5b4ed8055359209f6b432f2 100644 (file)
@@ -189,8 +189,12 @@ int comedi_set_user_int_count(comedi_t *d,unsigned int subdevice,unsigned int bu
        comedi_device *dev = (comedi_device *)d;
        comedi_subdevice *s = dev->subdevices + subdevice;
        comedi_async *async;
+       unsigned int num_bytes;
 
        async = s->async;
+
+       num_bytes =  buf_user_count - async->buf_read_count;
+       comedi_buf_read_free( async, num_bytes );
        async->buf_read_count = buf_user_count;
 
        return 0;