For session sources without a file descriptor to poll a negative number
should be passed for the fd parameter. The hung-chang-dso-2100 driver
currently passes 0 instead, which is the stdin stream. Fix it the issue by
passing -1 for the fd parameter.

Signed-off-by: Lars-Peter Clausen <l...@metafoo.de>
---
 src/hardware/hung-chang-dso-2100/api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hardware/hung-chang-dso-2100/api.c 
b/src/hardware/hung-chang-dso-2100/api.c
index b3b4634..45fff2b 100644
--- a/src/hardware/hung-chang-dso-2100/api.c
+++ b/src/hardware/hung-chang-dso-2100/api.c
@@ -715,7 +715,7 @@ static int dev_acquisition_start(const struct sr_dev_inst 
*sdi,
 
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
-       sr_session_source_add(sdi->session, 0, 0, 8,
+       sr_session_source_add(sdi->session, -1, 0, 8,
                              hung_chang_dso_2100_poll, (void *)sdi);
 
        return SR_OK;
@@ -730,7 +730,7 @@ SR_PRIV int hung_chang_dso_2100_dev_acquisition_stop(const 
struct sr_dev_inst *s
                return SR_ERR_DEV_CLOSED;
 
        sr_session_send(cb_data, &packet);
-       sr_session_source_remove(sdi->session, 0);
+       sr_session_source_remove(sdi->session, -1);
 
        hung_chang_dso_2100_move_to(sdi, 1);
 
-- 
2.1.4


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to