fixed dereferencing of chanlist, hopefully this will also fix the occasional segfaults
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 10 May 2001 17:47:59 +0000 (17:47 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 10 May 2001 17:47:59 +0000 (17:47 +0000)
comedi/drivers/comedi_rt_timer.c

index 63ef5b55de4a43beaf58883ca7dc2a677dddc848..bfdfec1cab0d82130ca6577507e9af4fc181d229 100644 (file)
@@ -130,9 +130,9 @@ static void timer_ai_task_func(int d)
        for(n=0;n<cmd->stop_arg;n++){
                for(i=0;i<cmd->scan_end_arg;i++){
                        ret = comedi_data_read(devpriv->device,devpriv->subd,
-                               CR_CHAN(devpriv->chanlist[i]),
-                               CR_RANGE(devpriv->chanlist[i]),
-                               CR_AREF(devpriv->chanlist[i]),
+                               CR_CHAN(cmd->chanlist[i]),
+                               CR_RANGE(cmd->chanlist[i]),
+                               CR_AREF(cmd->chanlist[i]),
                                &data);
                        if(ret<0){
                                /* eek! */
@@ -184,9 +184,9 @@ static void timer_ao_task_func(int d)
                                        /* eek! */
                                }
                                ret = comedi_data_write(devpriv->device,devpriv->subd,
-                                       CR_CHAN(devpriv->chanlist[i]),
-                                       CR_RANGE(devpriv->chanlist[i]),
-                                       CR_AREF(devpriv->chanlist[i]),
+                                       CR_CHAN(cmd->chanlist[i]),
+                                       CR_RANGE(cmd->chanlist[i]),
+                                       CR_AREF(cmd->chanlist[i]),
                                        data);
                                if(ret<0){
                                        /* eek! */