workaround for some versions of libusb
Some versions of libusb don't seem to like if you call libusb_init if you already have another instance opened. (1.0.8 on Debian squeeze e.g.) Thus, print name of device before opening it. Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
+1
-2
@@ -97,6 +97,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("Found %d device(s).\n", device_count);
|
printf("Found %d device(s).\n", device_count);
|
||||||
|
printf("Using %s\n", rtlsdr_get_device_name(dev_index));
|
||||||
|
|
||||||
r = rtlsdr_open(&dev, dev_index);
|
r = rtlsdr_open(&dev, dev_index);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
@@ -104,8 +105,6 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Using %s\n", rtlsdr_get_device_name(dev_index));
|
|
||||||
|
|
||||||
sigact.sa_handler = sighandler;
|
sigact.sa_handler = sighandler;
|
||||||
sigemptyset(&sigact.sa_mask);
|
sigemptyset(&sigact.sa_mask);
|
||||||
sigact.sa_flags = 0;
|
sigact.sa_flags = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user