From 8d9e6b58bb8dac8a92603feb8804c42ecc1e5945 Mon Sep 17 00:00:00 2001 From: Jon Szymaniak Date: Tue, 4 Nov 2014 21:52:23 -0500 Subject: [PATCH] bladeRF: Fixed incorrectly placed 'else' This addresses a defect introduced in 6e75abf which causes the _consecutive_failures count to get reset with every failure, rather then upon a successful return value. --- lib/bladerf/bladerf_sink_c.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bladerf/bladerf_sink_c.cc b/lib/bladerf/bladerf_sink_c.cc index 4d26416..2dc2e04 100644 --- a/lib/bladerf/bladerf_sink_c.cc +++ b/lib/bladerf/bladerf_sink_c.cc @@ -136,9 +136,9 @@ int bladerf_sink_c::work( int noutput_items, std::cerr << _pfx << "Consecutive error limit hit. Shutting down." << std::endl; - } else { - _consecutive_failures = 0; } + } else { + _consecutive_failures = 0; } return noutput_items;