diff options
author | Josh Blum | 2013-05-01 10:12:03 -0700 |
---|---|---|
committer | Josh Blum | 2013-05-01 10:12:03 -0700 |
commit | 174060bf4cc236a96ad8f42b19607946ae332a34 (patch) | |
tree | 8e78f108e1ec206118b97d20ddd5edeee33b3b93 /gr-blocks/lib | |
parent | 589915f97bba8499715bc61d2dec64b6fd7bca25 (diff) | |
parent | bad3b840f0408d18082de5fca8ae5804a751a30d (diff) | |
download | gnuradio-174060bf4cc236a96ad8f42b19607946ae332a34.tar.gz gnuradio-174060bf4cc236a96ad8f42b19607946ae332a34.tar.bz2 gnuradio-174060bf4cc236a96ad8f42b19607946ae332a34.zip |
Merge branch 'maint' into v3.6.4git_gras_support
Diffstat (limited to 'gr-blocks/lib')
-rw-r--r-- | gr-blocks/lib/file_meta_source_impl.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gr-blocks/lib/file_meta_source_impl.cc b/gr-blocks/lib/file_meta_source_impl.cc index 42fdabb54..316f5e7d1 100644 --- a/gr-blocks/lib/file_meta_source_impl.cc +++ b/gr-blocks/lib/file_meta_source_impl.cc @@ -376,7 +376,15 @@ namespace gr { parse_extras(extras, nitems_written(0), d_tags); } else { - return -1; + if(!d_repeat) + return -1; + else { + if(fseek(d_fp, 0, SEEK_SET) == -1) { + std::stringstream s; + s << "[" << __FILE__ << "]" << " fseek failed" << std::endl; + throw std::runtime_error(s.str()); + } + } } } @@ -404,7 +412,7 @@ namespace gr { out += i * d_itemsize; if(size == 0) // done - break; + break; if(i > 0) // short read, try again continue; @@ -424,7 +432,7 @@ namespace gr { } if(size > 0) { // EOF or error - if(size == seg_size) // we didn't read anything; say we're done + if(size == seg_size) // we didn't read anything; say we're done return -1; return seg_size - size; // else return partial result } |