demo: poll: fix polling of wrong subdevice

The call to comedi_poll() always sets the subdevice parameter to 0.  Set
it to the subdevice that the streaming command is using.
This commit is contained in:
Ian Abbott 2016-05-13 16:42:14 +01:00
parent 8c31fb88c1
commit 7a8b838e66

View file

@ -123,7 +123,7 @@ void do_cmd(comedi_t *dev,comedi_cmd *cmd)
}else if(ret==0){
/* hit timeout */
printf("timeout, polling...\n");
ret = comedi_poll(device,0);
ret = comedi_poll(device,cmd->subdev);
printf("poll returned %d\n",ret);
}else if(FD_ISSET(comedi_fileno(device),&rdset)){
/* comedi file descriptor became ready */