GHashTable *devargs;
GVariant *gvar;
struct sr_dev_inst *sdi;
+ uint64_t max_samples;
int max_probes, i;
char **triggerlist;
sr_session_destroy();
return;
}
+ if (sr_config_get(sdi->driver, sdi, NULL,
+ SR_CONF_MAX_UNCOMPRESSED_SAMPLES, &gvar) == SR_OK) {
+ /* The device has no compression, or compression is turned
+ * off, and publishes its sample memory size. */
+ max_samples = g_variant_get_uint64(gvar);
+ if (limit_samples > max_samples) {
+ g_critical("The device can store only %"PRIu64
+ " samples with the current settings.", max_samples);
+ }
+ }
gvar = g_variant_new_uint64(limit_samples);
if (sr_config_set(sdi, NULL, SR_CONF_LIMIT_SAMPLES, gvar) != SR_OK) {
g_critical("Failed to configure sample limit.");