Skip to content

Commit

Permalink
resolving PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsont-oci committed Jun 27, 2019
1 parent f3aaa7e commit b98e452
Show file tree
Hide file tree
Showing 13 changed files with 203 additions and 246 deletions.
3 changes: 1 addition & 2 deletions dds/DCPS/transport/framework/DataLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ class OpenDDS_Dcps_Export DataLink
/// This method is essentially an "undo_send()" method. It's goal
/// is to remove all traces of the sample from this DataLink (if
/// the sample is even known to the DataLink).
virtual RemoveResult remove_sample(const DataSampleElement* sample,
void* context);
virtual RemoveResult remove_sample(const DataSampleElement* sample);

// ciju: Called by LinkSet with locks held
void remove_all_msgs(RepoId pub_id);
Expand Down
4 changes: 2 additions & 2 deletions dds/DCPS/transport/framework/DataLink.inl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void DataLink::set_scheduling_release(bool scheduling_release)
}

ACE_INLINE RemoveResult
DataLink::remove_sample(const DataSampleElement* sample, void* context)
DataLink::remove_sample(const DataSampleElement* sample)
{
DBG_ENTRY_LVL("DataLink", "remove_sample", 6);

Expand All @@ -201,7 +201,7 @@ DataLink::remove_sample(const DataSampleElement* sample, void* context)
}

if (!strategy.is_nil()) {
return strategy->remove_sample(sample, context);
return strategy->remove_sample(sample);
}

return REMOVE_NOT_FOUND;
Expand Down
2 changes: 1 addition & 1 deletion dds/DCPS/transport/framework/DataLinkSet.inl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ OpenDDS::DCPS::DataLinkSet::remove_sample(const DataSampleElement* sample)
const MapType::iterator end = this->map_.end();
for (MapType::iterator itr = this->map_.begin(); itr != end; ++itr) {

if (itr->second->remove_sample(sample, 0) == REMOVE_RELEASED) {
if (itr->second->remove_sample(sample) == REMOVE_RELEASED) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion dds/DCPS/transport/framework/TransportSendBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SingleSendBuffer::release(BufferMap::iterator buffer_iter)
}

void
SingleSendBuffer::retain_all(RepoId pub_id)
SingleSendBuffer::retain_all(const RepoId& pub_id)
{
if (Transport_debug_level > 5) {
GuidConverter converter(pub_id);
Expand Down
4 changes: 2 additions & 2 deletions dds/DCPS/transport/framework/TransportSendBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class OpenDDS_Dcps_Export TransportSendBuffer {
size_t capacity() const;
void bind(TransportSendStrategy* strategy);

virtual void retain_all(RepoId pub_id) = 0;
virtual void retain_all(const RepoId& pub_id) = 0;
virtual void insert(SequenceNumber sequence,
TransportSendStrategy::QueueType* queue,
ACE_Message_Block* chain) = 0;
Expand Down Expand Up @@ -100,7 +100,7 @@ class OpenDDS_Dcps_Export SingleSendBuffer
bool empty() const;
bool contains(const SequenceNumber& seq) const;

void retain_all(RepoId pub_id);
void retain_all(const RepoId& pub_id);
void insert(SequenceNumber sequence,
TransportSendStrategy::QueueType* queue,
ACE_Message_Block* chain);
Expand Down
9 changes: 4 additions & 5 deletions dds/DCPS/transport/framework/TransportSendStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,11 +1276,11 @@ TransportSendStrategy::remove_all_msgs(RepoId pub_id)
this->send_buffer_->retain_all(pub_id);
}

do_remove_sample(pub_id, match, 0);
do_remove_sample(pub_id, match);
}

RemoveResult
TransportSendStrategy::remove_sample(const DataSampleElement* sample, void* context)
TransportSendStrategy::remove_sample(const DataSampleElement* sample)
{
DBG_ENTRY_LVL("TransportSendStrategy", "remove_sample", 6);

Expand All @@ -1304,13 +1304,12 @@ TransportSendStrategy::remove_sample(const DataSampleElement* sample, void* cont
}

GuardType guard(this->lock_);
return do_remove_sample(pub_id, modp, context);
return do_remove_sample(pub_id, modp);
}

RemoveResult
TransportSendStrategy::do_remove_sample(const RepoId&,
const TransportQueueElement::MatchCriteria& criteria,
void*)
const TransportQueueElement::MatchCriteria& criteria)
{
DBG_ENTRY_LVL("TransportSendStrategy", "do_remove_sample", 6);

Expand Down
17 changes: 8 additions & 9 deletions dds/DCPS/transport/framework/TransportSendStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class OpenDDS_Dcps_Export TransportSendStrategy
/// Our DataLink has been requested by some particular
/// TransportClient to remove the supplied sample
/// (basically, an "unsend" attempt) from this strategy object.
RemoveResult remove_sample(const DataSampleElement* sample, void* context);
RemoveResult remove_sample(const DataSampleElement* sample);

void remove_all_msgs(RepoId pub_id);

Expand Down Expand Up @@ -139,6 +139,12 @@ class OpenDDS_Dcps_Export TransportSendStrategy

void deliver_ack_request(TransportQueueElement* element);

/// Put the maximum UDP payload size here so that it can be shared by all
/// UDP-based transports. This is the worst-case (conservative) value for
/// UDP/IPv4. If there are no IP options, or if IPv6 is used, it could
/// actually be a little larger.
static const size_t UDP_MAX_MESSAGE_SIZE = 65466;

protected:

TransportSendStrategy(std::size_t id,
Expand Down Expand Up @@ -174,12 +180,6 @@ class OpenDDS_Dcps_Export TransportSendStrategy
/// reassembly will be transparent to the user.
virtual size_t max_message_size() const;

/// Put the maximum UDP payload size here so that it can be shared by all
/// UDP-based transports. This is the worst-case (conservative) value for
/// UDP/IPv4. If there are no IP options, or if IPv6 is used, it could
/// actually be a little larger.
static const size_t UDP_MAX_MESSAGE_SIZE = 65466;

/// Set graceful disconnecting flag.
void set_graceful_disconnecting(bool flag);

Expand Down Expand Up @@ -297,8 +297,7 @@ class OpenDDS_Dcps_Export TransportSendStrategy
protected:
/// Implement framework chain visitations to remove a sample.
virtual RemoveResult do_remove_sample(const RepoId& pub_id,
const TransportQueueElement::MatchCriteria& criteria,
void* context);
const TransportQueueElement::MatchCriteria& criteria);

private:

Expand Down
Loading

0 comments on commit b98e452

Please sign in to comment.