]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
build: Portability fixes.
[libsigrok.git] / hardware / hantek-dso / api.c
index 76696d57525e3b17dd75a15e41a0348985d0c482..c948e4216a8260ea591f207a5ebaf9d62feeb375 100644 (file)
@@ -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);