]> sigrok.org Git - libsigrok.git/commitdiff
drivers: Match dummy FD passed to source add/remove
authorDaniel Elstner <redacted>
Mon, 7 Sep 2015 12:33:30 +0000 (14:33 +0200)
committerDaniel Elstner <redacted>
Mon, 7 Sep 2015 12:33:30 +0000 (14:33 +0200)
src/hardware/asix-sigma/asix-sigma.c
src/hardware/brymen-bm86x/api.c
src/hardware/pipistrello-ols/api.c
src/hardware/uni-t-dmm/api.c

index c75fdffb961f0558c44722fcd0e43e11c961ec72..0eaaf97621ce966c1fc1eea39af5c11a06c03c16 100644 (file)
@@ -1533,7 +1533,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        devc = sdi->priv;
        devc->state.state = SIGMA_IDLE;
 
-       sr_session_source_remove(sdi->session, 0);
+       sr_session_source_remove(sdi->session, -1);
 
        return SR_OK;
 }
index 5edc8383b419d8990aeeb3598e80f34ef2483605..b2fae5548aad624eedff2db0388a24edd7585c2d 100644 (file)
@@ -283,7 +283,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        packet.type = SR_DF_END;
        sr_session_send(sdi, &packet);
 
-       sr_session_source_remove(sdi->session, 0);
+       sr_session_source_remove(sdi->session, -1);
 
        return SR_OK;
 }
index 2c0313ba2bec718dd8cba953e33ecc7526362dc4..03cda60b165846450fca7bfcac60681f78a7689d 100644 (file)
@@ -713,7 +713,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        write_shortcommand(devc, CMD_RESET);
        write_shortcommand(devc, CMD_RESET);
 
-       sr_session_source_remove(sdi->session, 0);
+       sr_session_source_remove(sdi->session, -1);
 
        /* Send end packet to the session bus. */
        sr_dbg("Sending SR_DF_END.");
index 199ad6b5a617bed5a3a2b78d85c5414aea2103c6..b92d5d140561a0b50daf3ad5e8f91970e0526dd1 100644 (file)
@@ -220,7 +220,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
        packet.type = SR_DF_END;
        sr_session_send(sdi, &packet);
 
-       sr_session_source_remove(sdi->session, 0);
+       sr_session_source_remove(sdi->session, -1);
 
        return SR_OK;
 }