summaryrefslogtreecommitdiff
path: root/gr-digital/lib/header_payload_demux_impl.cc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@kit.edu>2013-04-19 12:58:35 +0200
committerMartin Braun <martin.braun@kit.edu>2013-05-11 13:50:34 +0200
commit7be24afbf8857a5e827fb536a80d7a83e7b6aa31 (patch)
treec76cafea7b2d33b0f0de615242d2d48004bc4f79 /gr-digital/lib/header_payload_demux_impl.cc
parent728c6e2138d5eb4f0814dcd3d03c65e628746eab (diff)
digital: OFDM passes all tests
Diffstat (limited to 'gr-digital/lib/header_payload_demux_impl.cc')
-rw-r--r--gr-digital/lib/header_payload_demux_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc
index f79678e903..0c3adf701e 100644
--- a/gr-digital/lib/header_payload_demux_impl.cc
+++ b/gr-digital/lib/header_payload_demux_impl.cc
@@ -123,7 +123,8 @@ namespace gr {
int produced_hdr = 0;
int produced_payload = 0;
- while (nread < noutput_items && !exit_loop) {
+ // FIXME ninput_items[1] does not have to be defined O_o
+ while (nread < noutput_items && nread < ninput_items[0] && nread < ninput_items[1] && !exit_loop) {
switch (d_state) {
case STATE_IDLE:
// 1) Search for a trigger signal on input 1 (if present)
@@ -154,6 +155,7 @@ namespace gr {
// 4) fall through to next state
d_remaining_symbols = -1;
if (!parse_header_data_msg()) {
+ d_state = STATE_IDLE;
exit_loop = true;
break;
}
@@ -241,6 +243,8 @@ namespace gr {
}
} else if (pmt::pmt_is_null(msg)) { // Blocking call was interrupted
return false;
+ } else if (msg == pmt::PMT_F) { // Header was invalid
+ return false;
} else {
throw std::runtime_error("Received illegal header data");
}