- if (sr_config_set(sdi, NULL, SR_CONF_LIMIT_SAMPLES,
- g_variant_new_uint64(sample_count)) != SR_OK) {
+ assert(!_updating_sample_count);
+ _updating_sample_count = true;
+ if (_sample_count_supported &&
+ !dev_inst->set_config(NULL, SR_CONF_LIMIT_SAMPLES,
+ g_variant_new_uint64(sample_count))) {