demo: Properly stop aquisition after reaching our sample quota
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sat, 1 Dec 2012 18:49:15 +0000 (12:49 -0600)
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sat, 1 Dec 2012 18:49:15 +0000 (12:49 -0600)
commit833d5268200442d1e58e7868a1ab4d28abf0b441
tree28765c399c605a0057392cb93f6ddd4767c87d98
parentcdb97451b3c52f43527a6948f3b7cb6b7914dc6b
demo: Properly stop aquisition after reaching our sample quota

The demo driver was using sr_session_source_add_channel() to add
a poll source, but was relying on sr_session_run_poll() to call
sr_session_source_remove(). This, coupled with the design of the
driver caused a hailstorm of errors once the samples were collected.

The error stream was most likely related to failing to properly close
one of the channels. Through some black magic, the hailstorm seems to
have stopped.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
hardware/demo/demo.c