X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fprotocol.c;h=c74187ada435f2441e7aa3b88ed926194c9d530b;hb=50bc52f3a6102ad687c8abe11cf1e39ab44b1e6a;hp=39d87c4433bb316564e0cdff84df818b76c2f808;hpb=d3f14af7ed07ba5b7e2c1af7c11614454021abbe;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;