- session_bus(device, &packet);
-
- packet.type = DF_LOGIC8;
- packet.payload = buffer;
- while( (size = read(fd, buffer, CHUNKSIZE)) > 0) {
- packet.length = size;
- session_bus(device, &packet);
+ sr_session_bus(in->vdevice, &packet);
+
+ /* chop up the input file into chunks and feed it into the session bus */
+ packet.type = SR_DF_LOGIC;
+ packet.payload = &logic;
+ logic.unitsize = (num_probes + 7) / 8;
+ logic.data = buffer;
+ while ((size = read(fd, buffer, CHUNKSIZE)) > 0) {
+ logic.length = size;
+ sr_session_bus(in->vdevice, &packet);