]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hameg-hmo/api.c
Add struct sr_session parameter to all session source backends.
[libsigrok.git] / hardware / hameg-hmo / api.c
index b5b3bc29f0100dc588c53d3091d6031b3b2d2688..ff045f16425e61ad091be85868c2111845cb39fe 100644 (file)
@@ -749,7 +749,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
                return SR_ERR;
        }
 
-       sr_scpi_source_add(scpi, G_IO_IN, 50, hmo_receive_data, (void *)sdi);
+       sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 50,
+                       hmo_receive_data, (void *)sdi);
 
        /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
@@ -780,7 +781,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        g_slist_free(devc->enabled_channels);
        devc->enabled_channels = NULL;
        scpi = sdi->conn;
-       sr_scpi_source_remove(scpi);
+       sr_scpi_source_remove(sdi->session, scpi);
 
        return SR_OK;
 }