summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2012-04-04 21:50:32 +0200
committerSteve Markgraf <steve@steve-m.de>2012-04-04 21:50:32 +0200
commit97db8149d9760e429c2c27939678819b31d58877 (patch)
tree40309353d7318681db49dd46bcb5734332e8594e /src
parent003446e508aaa7eba80c95667a4dc45995aa43c7 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 6828c73..31a34a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,6 +97,7 @@ int main(int argc, char **argv)
}
printf("Found %d device(s).\n", device_count);
+ printf("Using %s\n", rtlsdr_get_device_name(dev_index));
r = rtlsdr_open(&dev, dev_index);
if (r < 0) {
@@ -104,8 +105,6 @@ int main(int argc, char **argv)
exit(1);
}
- printf("Using %s\n", rtlsdr_get_device_name(dev_index));
-
sigact.sa_handler = sighandler;
sigemptyset(&sigact.sa_mask);
sigact.sa_flags = 0;