colead-slm: Properly check acquisition sample limit.

This commit is contained in:
Bert Vermeulen 2014-09-23 22:27:34 +02:00
parent 79f92686c6
commit 9a10ce65d6
1 changed files with 3 additions and 0 deletions

View File

@ -173,6 +173,9 @@ static void process_packet(const struct sr_dev_inst *sdi)
sr_session_send(devc->cb_data, &packet);
devc->num_samples++;
if (devc->num_samples >= devc->limit_samples)
sdi->driver->dev_acquisition_stop((struct sr_dev_inst *)sdi,
devc->cb_data);
}