(void)cg;
+ if (!sdi)
+ return SR_ERR_ARG;
+
+ devc = sdi->priv;
+
switch (id) {
case SR_CONF_CONN:
- if (!sdi || !sdi->conn)
+ if (!sdi->conn)
return SR_ERR_ARG;
usb = sdi->conn;
if (usb->address == 255)
snprintf(str, 128, "%d.%d", usb->bus, usb->address);
*data = g_variant_new_string(str);
break;
+ case SR_CONF_LIMIT_SAMPLES:
+ *data = g_variant_new_uint64(devc->limit_samples);
+ break;
case SR_CONF_SAMPLERATE:
- if (!sdi)
- return SR_ERR;
- devc = sdi->priv;
*data = g_variant_new_uint64(devc->cur_samplerate);
break;
default: