diff options
author | Jacob Gilbert <jacob.gilbert@sandia.gov> | 2016-02-08 07:36:01 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-02-08 07:42:11 -0800 |
commit | 0f9bab7c0e46e029cbe1864cfd766dc7a80897ef (patch) | |
tree | 6e9b1f1cb919789bdc2794473c1e2f7effba39f0 /gr-blocks/lib/message_debug_impl.cc | |
parent | 1e232b237e210be17ad635b53a78017cd6778a75 (diff) |
blocks: fix incorrect use of items/bytes in PDU handling
For a uniform vector, calls to pmt::length return the number
of items in in the vector. However, in some places this was
being treated as a byte value, resulting in short writes and
other misinterpretations.
These calls have been replaced with calls to pmt::blob_length,
to unambiguously get the length in bytes, then converted if
necessary to item values.
Diffstat (limited to 'gr-blocks/lib/message_debug_impl.cc')
-rw-r--r-- | gr-blocks/lib/message_debug_impl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc index 620ca1eb42..8bab788261 100644 --- a/gr-blocks/lib/message_debug_impl.cc +++ b/gr-blocks/lib/message_debug_impl.cc @@ -61,7 +61,7 @@ namespace gr { pmt::pmt_t vector = pmt::cdr(pdu); std::cout << "* MESSAGE DEBUG PRINT PDU VERBOSE *\n"; pmt::print(meta); - size_t len = pmt::length(vector); + size_t len = pmt::blob_length(vector); std::cout << "pdu_length = " << len << std::endl; std::cout << "contents = " << std::endl; size_t offset(0); |