aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClayton Smith <argilo@gmail.com>2022-01-15 16:30:39 +0000
committerSteve Markgraf <steve@steve-m.de>2022-01-19 17:59:16 +0100
commit5e73f90f1d85d8db2e583f3dbf1cff052d71d59b (patch)
tree0407ed61b54887e300620db3c5e262b9c9ae59e8
parent2659e2df31e592d74d6dd264a4f5ce242c6369c8 (diff)
lib: Stop applying workaround for libusb < 1.0.9HEADmaster
Librtlsdr has a workaround for libusb versions that lack libusb_handle_events_timeout_completed, which was added in version 1.0.9 (released 2012-04-02). The workaround is always applied unless the HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED macro is set, but the cmake code that sets this macro was removed in 849f8efca42b659bf7e8fe17156ee0aa67b47233. As a result, the workaround is now always applied. This results in an extra 1-second delay whenever a GNU Radio flowgraph containing an RTL-SDR block is stopped, which makes operations like switching between demodulators in Gqrx annoyingly slow. To solve this problem, I've simply removed the workaround, as it should no longer be needed. I wonder if perhaps the workaround recently applied in 2659e2df31e592d74d6dd264a4f5ce242c6369c8 might stem from the same bug.
-rw-r--r--src/librtlsdr.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
index 2682d77..096abae 100644
--- a/src/librtlsdr.c
+++ b/src/librtlsdr.c
@@ -39,12 +39,6 @@
#define LIBUSB_CALL
#endif
-/* libusb < 1.0.9 doesn't have libusb_handle_events_timeout_completed */
-#ifndef HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED
-#define libusb_handle_events_timeout_completed(ctx, tv, c) \
- libusb_handle_events_timeout(ctx, tv)
-#endif
-
/* two raised to the power of n */
#define TWO_POW(n) ((double)(1ULL<<(n)))