From d4387f436dd3555c7c590273916df6798cc9dd1f Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Tue, 24 Feb 2015 11:30:16 +0200 Subject: [PATCH] Require hackrf argument to have a non-zero-length value to trigger serial number search Signed-off-by: Heikki Hannikainen --- lib/hackrf/hackrf_source_c.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc index f9ed206..d3b3d86 100644 --- a/lib/hackrf/hackrf_source_c.cc +++ b/lib/hackrf/hackrf_source_c.cc @@ -106,7 +106,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args) dict_t dict = params_to_dict(args); - if (dict.count("hackrf")) + if (dict.count("hackrf") && dict["hackrf"].length() > 0) hackrf_serial = &dict["hackrf"]; _buf_num = _buf_len = _buf_head = _buf_used = _buf_offset = 0;