X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fhantek-dso%2Fapi.c;h=c948e4216a8260ea591f207a5ebaf9d62feeb375;hb=102f12396660e0784134bccce5cc0679db325751;hp=76696d57525e3b17dd75a15e41a0348985d0c482;hpb=85b69c2b64fc3f0b0478063a983c1920bf0e30a7;p=libsigrok.git diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 76696d57..c948e421 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -822,7 +822,7 @@ static int handle_event(int fd, int revents, void *cb_data) * TODO: Doesn't really cancel pending transfers so they might * come in after SR_DF_END is sent. */ - usb_source_remove(drvc->sr_ctx); + usb_source_remove(sdi->session, drvc->sr_ctx); packet.type = SR_DF_END; sr_session_send(sdi, &packet); @@ -933,7 +933,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) return SR_ERR; devc->dev_state = CAPTURE; - usb_source_add(drvc->sr_ctx, TICK, handle_event, (void *)sdi); + usb_source_add(sdi->session, drvc->sr_ctx, TICK, handle_event, (void *)sdi); /* Send header packet to the session bus. */ std_session_send_df_header(cb_data, LOG_PREFIX);