X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=hardware%2Fhantek-dso%2Fapi.c;h=c948e4216a8260ea591f207a5ebaf9d62feeb375;hp=76696d57525e3b17dd75a15e41a0348985d0c482;hb=43cd4637285833706f8a404ca027bcf0ee75b9ae;hpb=3f239f0803b9fbc073dd7abe9fc7b2a0c606fbb6 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);