From 1c7f93a50ec5038a953063118ad4160f57aa1d0c Mon Sep 17 00:00:00 2001 From: sma Date: Fri, 10 Aug 2012 14:01:17 +0000 Subject: Fri Aug 10 14:00:00 UTC 2012 Simon Massey MIOP Fragmentation --- .../UIPMC_Message_Block_Data_Iterator.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.h') diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.h index 0378e1aac7c..0bfffc1e5fc 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.h @@ -38,30 +38,26 @@ public: UIPMC_Message_Block_Data_Iterator (iovec *iov, int iovcnt); /// Get the next data block that has a size less than or equal - /// to max_length. Return the length of the block returned. - size_t next_block (size_t max_length, - iovec &block); + /// to max_length. Return true if there is anything left. + bool next_block (size_t max_length, iovec &block); private: - enum State - { - INTER_BLOCK, - INTRA_BLOCK - }; - iovec *iov_; int iovcnt_; + int iov_index_; // Point internal to a message block, if we have to split one up. char *iov_ptr_; - int iov_index_; // Length used in a split message block. size_t iov_len_left_; // Current message iterator state. - State state_; - + enum State + { + INTER_BLOCK, + INTRA_BLOCK + } state_; }; TAO_END_VERSIONED_NAMESPACE_DECL -- cgit v1.2.1