File tree Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ class OpenDDS_Dcps_Export Message_Block_Shared_Ptr {
61
61
return *this ;
62
62
}
63
63
64
+ #ifdef ACE_HAS_CPP11
65
+ Message_Block_Shared_Ptr (Message_Block_Shared_Ptr&&) = default;
66
+ Message_Block_Shared_Ptr& operator =(Message_Block_Shared_Ptr&&) = default ;
67
+ #endif
68
+
64
69
operator bool () const { return msg_.get (); }
65
70
66
71
ACE_Message_Block& operator *() const { return *msg_; }
@@ -123,7 +128,15 @@ class OpenDDS_Dcps_Export Lockable_Message_Block_Ptr {
123
128
return *this ;
124
129
}
125
130
126
- Lockable_Message_Block_Ptr& operator =(Lockable_Message_Block_Ptr&&) = default ;
131
+ Lockable_Message_Block_Ptr& operator =(Lockable_Message_Block_Ptr&& other)
132
+ {
133
+ if (&other != this ) {
134
+ // msgblock_ first so that this->msgblock_ can use this->lock_ in its own operator=
135
+ msgblock_ = exchange (other.msgblock_ , Message_Block_Shared_Ptr{});
136
+ lock_ = exchange (other.lock_ , Lock_Shared_Ptr{});
137
+ }
138
+ return *this ;
139
+ }
127
140
128
141
Lock_Policy lock_policy () const { return lock_ ? Lock_Policy::Use_Lock : Lock_Policy::No_Lock; }
129
142
@@ -172,6 +185,15 @@ class OpenDDS_Dcps_Export Lockable_Message_Block_Ptr {
172
185
}
173
186
}
174
187
};
188
+
189
+ // In C++14 this is std::exchange
190
+ template <typename T, typename U = T>
191
+ T exchange (T& from, U&& to)
192
+ {
193
+ const T old = std::move (from);
194
+ from = std::forward<U>(to);
195
+ return old;
196
+ }
175
197
};
176
198
#endif
177
199
Original file line number Diff line number Diff line change @@ -499,7 +499,7 @@ bool RtpsDiscovery::remove_domain_participant(
499
499
if (domain->second .empty ()) {
500
500
participants_.erase (domain);
501
501
}
502
- if (participants_.empty ()) {
502
+ if (participants_.empty () && stats_task_ ) {
503
503
stats_task_->disable ();
504
504
}
505
505
g.release ();
Original file line number Diff line number Diff line change @@ -4022,6 +4022,7 @@ Spdp::send_participant_crypto_tokens(const DCPS::GUID_t& id)
4022
4022
DDS::Security::ParticipantVolatileMessageSecure msg;
4023
4023
msg.message_identity .source_guid = writer;
4024
4024
msg.related_message_identity .source_guid = GUID_UNKNOWN;
4025
+ msg.related_message_identity .sequence_number = 0 ;
4025
4026
msg.message_class_id = DDS::Security::GMCLASSID_SECURITY_PARTICIPANT_CRYPTO_TOKENS;
4026
4027
msg.destination_participant_guid = peer;
4027
4028
msg.destination_endpoint_guid = GUID_UNKNOWN; // unknown = whole participant
@@ -4844,6 +4845,7 @@ void Spdp::fill_stats(DCPS::StatisticSeq& stats) const
4844
4845
stats[Stats_Index_TotalReaderPending].value = total_reader_pending_;
4845
4846
stats[Stats_Index_TotalReaderAssociated].value = total_reader_associated_;
4846
4847
stats[Stats_Index_DirectedGuids].value = tport_ ? tport_->directed_guids_ .size () : 0 ;
4848
+ sedp_->fill_stats (stats, Stats_Len);
4847
4849
}
4848
4850
4849
4851
DCPS::TopicStatus Spdp::assert_topic (GUID_t& topicId, const char * topicName,
Original file line number Diff line number Diff line change 1
- .. news-prs: 4990 5000 5006
1
+ .. news-prs: 4990 5000 5006 5023
2
2
3
3
.. news-start-section: Additions
4
4
- Output from :option: `RtpsRelay -LogRelayStatistics ` / :option: `RtpsRelay -PublishRelayStatistics ` includes internal OpenDDS statistics
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ class GuidAddrSet {
170
170
, total_ips_(0 )
171
171
, total_ports_(0 )
172
172
, participant_admission_limit_reached_(false )
173
+ , last_admit_(true )
173
174
{}
174
175
175
176
using CreatedAddrSetStats = std::pair<bool , AddrSetStats&>;
You can’t perform that action at this time.
0 commit comments