X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fprotocol.c;h=c74187ada435f2441e7aa3b88ed926194c9d530b;hb=6c1a76d1263403f908ac31271a4fd01792488545;hp=39d87c4433bb316564e0cdff84df818b76c2f808;hpb=7bbe5a2b6a3cea7bc5b59ca3c34ed4f6fcf8c3b1;p=libsigrok.git diff --git a/src/hardware/hantek-dso/protocol.c b/src/hardware/hantek-dso/protocol.c index 39d87c44..c74187ad 100644 --- a/src/hardware/hantek-dso/protocol.c +++ b/src/hardware/hantek-dso/protocol.c @@ -130,7 +130,9 @@ SR_PRIV int dso_open(struct sr_dev_inst *sdi) /* * Check device by its physical USB bus/port address. */ - usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)); + if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0) + continue; + if (strcmp(sdi->connection_id, connection_id)) /* This is not the one. */ continue;