tokens = g_strsplit(buf, ",", 4);
if (!strcmp("Agilent Technologies", tokens[0])
- && tokens[2] && tokens[3]) {
+ && tokens[1] && tokens[2] && tokens[3]) {
for (i = 0; supported_agdmm[i].model; i++) {
if (strcmp(supported_agdmm[i].modelname, tokens[1]))
continue;
return dev_clear();
}
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+ const struct sr_probe_group *probe_group)
{
struct dev_context *devc;
+ (void)probe_group;
+
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
return SR_OK;
}
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+ const struct sr_probe_group *probe_group)
{
-
(void)sdi;
+ (void)probe_group;
switch (key) {
case SR_CONF_SCAN_OPTIONS:
/* Poll every 100ms, or whenever some data comes in. */
serial = sdi->conn;
- sr_source_add(serial->fd, G_IO_IN, 100, agdmm_receive_data, (void *)sdi);
+ serial_source_add(serial, G_IO_IN, 100, agdmm_receive_data, (void *)sdi);
return SR_OK;
}