mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-03 21:33:15 +00:00
Transceiver52M: Check that sample rates are sane before using
If there is an error in the sample rate determination, noted by a negative return sample rate value, error directly and don't try to set the device rate. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6739 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
@@ -550,7 +550,7 @@ int uhd_device::open(const std::string &args)
|
||||
|
||||
// Set rates
|
||||
desired_smpl_rt = select_rate(dev_type, sps);
|
||||
if (set_rates(desired_smpl_rt) < 0)
|
||||
if ((desired_smpl_rt > 0.0) && (set_rates(desired_smpl_rt) < 0))
|
||||
return -1;
|
||||
|
||||
// Create receive buffer
|
||||
|
||||
Reference in New Issue
Block a user