diff options
-rw-r--r-- | gr-blocks/lib/message_debug_impl.cc | 2 | ||||
-rw-r--r-- | gr-blocks/lib/pdu_to_tagged_stream_impl.cc | 3 | ||||
-rw-r--r-- | gr-blocks/lib/socket_pdu_impl.cc | 4 | ||||
-rw-r--r-- | gr-blocks/lib/tcp_connection.cc | 2 |
4 files changed, 6 insertions, 5 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); diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc index 3a2b50efe1..aec5d335c4 100644 --- a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc +++ b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc @@ -65,7 +65,8 @@ namespace gr { d_curr_meta = pmt::car(msg); d_curr_vect = pmt::cdr(msg); - d_curr_len = pmt::length(d_curr_vect); + // do not assume the length of PMT is in items (e.g.: from socket_pdu) + d_curr_len = pmt::blob_length(d_curr_vect)/d_itemsize; } return d_curr_len; diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc index 7f7abd50be..cc45557bca 100644 --- a/gr-blocks/lib/socket_pdu_impl.cc +++ b/gr-blocks/lib/socket_pdu_impl.cc @@ -196,7 +196,7 @@ namespace gr { socket_pdu_impl::tcp_client_send(pmt::pmt_t msg) { pmt::pmt_t vector = pmt::cdr(msg); - size_t len = pmt::length(vector); + size_t len = pmt::blob_length(vector); size_t offset = 0; std::vector<char> txbuf(std::min(len, d_rxbuf.size())); while (offset < len) { @@ -214,7 +214,7 @@ namespace gr { return; pmt::pmt_t vector = pmt::cdr(msg); - size_t len = pmt::length(vector); + size_t len = pmt::blob_length(vector); size_t offset = 0; std::vector<char> txbuf(std::min(len, d_rxbuf.size())); while (offset < len) { diff --git a/gr-blocks/lib/tcp_connection.cc b/gr-blocks/lib/tcp_connection.cc index 27bdf6a57d..3b0afa13fc 100644 --- a/gr-blocks/lib/tcp_connection.cc +++ b/gr-blocks/lib/tcp_connection.cc @@ -53,7 +53,7 @@ namespace gr { void tcp_connection::send(pmt::pmt_t vector) { - size_t len = pmt::length(vector); + size_t len = pmt::blob_length(vector); size_t offset = 0; std::vector<char> txbuf(std::min(len, d_buf.size())); while (offset < len) { |