struct sr_config *src;
struct sr_dev_inst *sdi;
struct sr_serial_dev_inst *serial;
- GSList *l, *devices;
+ GSList *l;
int ret;
unsigned int i;
const char *conn, *serialcomm;
char buf[8];
- devices = NULL;
-
conn = serialcomm = NULL;
for (l = options; l; l = l->next) {
src = l->data;
sdi->inst_type = SR_INST_SERIAL;
sdi->conn = serial;
- devices = g_slist_append(devices, sdi);
-
serial_close(serial);
- return std_scan_complete(di, devices);
+ return std_scan_complete(di, g_slist_append(NULL, sdi));
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
devc->cnt_bytes = devc->cnt_samples = devc->cnt_samples_rle = 0;
memset(devc->sample, 0, 4);
- std_session_send_df_header(sdi, LOG_PREFIX);
+ std_session_send_df_header(sdi);
/* If the device stops sending for longer than it takes to send a byte,
* that means it's finished. But wait at least 100 ms to be safe.