Require hackrf argument to have a non-zero-length value to trigger serial number search

Signed-off-by: Heikki Hannikainen <hessu@hes.iki.fi>
soapy_support
Heikki Hannikainen 8 years ago committed by Dimitri Stolnikov
parent 9595b044b6
commit d4387f436d
  1. 2
      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;

Loading…
Cancel
Save