return -1 (DONE flag) if source or sink sees an error
[debian/gnuradio] / gr-usrp2 / src / usrp2_source_32fc.cc
index 0d241851808ed08fc15cf398dba68b9c8ba7936d..5726f2279e72a358ba1e039301f69ba67a621901 100644 (file)
@@ -59,8 +59,10 @@ usrp2_source_32fc::work(int noutput_items,
   rx_32fc_handler::sptr handler = rx_32fc_handler::make(noutput_items, USRP2_MIN_RX_SAMPLES, out);
 
   bool ok = d_u2->rx_samples(0, handler.get());
-  if (!ok)
+  if (!ok){
     std::cerr << "usrp2::rx_samples() failed" << std::endl;
+    return -1; // say we're done
+  }
 
   return handler->nsamples();
 }