mooshimeter-dmm: Only report successful scan upon working connection.

This commit is contained in:
Uwe Hermann 2019-10-25 16:58:27 +02:00
parent ebcd1aba01
commit 59d916fe67
1 changed files with 5 additions and 0 deletions

View 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));