]> sigrok.org Git - libsigrok.git/commitdiff
mooshimeter-dmm: Only report successful scan upon working connection.
authorUwe Hermann <redacted>
Fri, 25 Oct 2019 14:58:27 +0000 (16:58 +0200)
committerUwe Hermann <redacted>
Sat, 26 Oct 2019 19:10:48 +0000 (21:10 +0200)
src/hardware/mooshimeter-dmm/api.c

index 08199a68aabb43433a264b9bd5681d78a03eb1d0..b1b940683038400e6e77b6de94e3b2628e02f310 100644 (file)
@@ -115,6 +115,11 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        if (ret < 0)
                goto err;
 
+       ret = sr_bt_connect_ble(desc);
+       if (ret < 0)
+               goto err;
+       sr_bt_disconnect(desc);
+
        struct sr_dev_inst *sdi = g_malloc0(sizeof(struct sr_dev_inst));
        struct dev_context *devc = g_malloc0(sizeof(struct dev_context));