@@ -38,12 +38,10 @@ class MessengerReplayerListener : public OpenDDS::DCPS::ReplayerListener {
38
38
const ::DDS::PublicationMatchedStatus & status)
39
39
{
40
40
if (status.current_count > 0 ) {
41
- ACE_DEBUG ((LM_DEBUG,
42
- ACE_TEXT (" MessengerReplayerListener -- a reader connect to replayer\n " )));
41
+ ACE_DEBUG ((LM_DEBUG, " MessengerReplayerListener -- a reader connect to replayer\n " ));
43
42
connected_readers_.insert (status.last_subscription_handle );
44
43
} else if (status.current_count == 0 && status.total_count > 0 ) {
45
- ACE_DEBUG ((LM_DEBUG,
46
- ACE_TEXT (" MessengerRecorderListener -- reader disconnect with replayer\n " )));
44
+ ACE_DEBUG ((LM_DEBUG, " MessengerReplayerListener -- reader disconnect with replayer\n " ));
47
45
}
48
46
}
49
47
@@ -74,11 +72,10 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
74
72
virtual void on_sample_data_received (OpenDDS::DCPS::Recorder*,
75
73
const OpenDDS::DCPS::RawDataSample& sample)
76
74
{
77
- ACE_DEBUG ((LM_DEBUG,
78
- ACE_TEXT (" MessengerRecorderListener::on_sample_data_received\n " )));
75
+ ACE_DEBUG ((LM_DEBUG, " MessengerRecorderListener::on_sample_data_received\n " ));
79
76
80
77
if (++sample_count_ >= NUM_SAMPLES) {
81
- dcs_->post (ACTOR_RECORDER, EVENT_RECEIVED_ALL_SAMPLES );
78
+ dcs_->post (ACTOR_RECORDER, EVENT_RECORDER_RECEIVED_ALL_SAMPLES );
82
79
}
83
80
84
81
MessengerReplayerListener* replayer_listener =
@@ -116,7 +113,7 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
116
113
{
117
114
// In the main thread, wait for the publisher to associate
118
115
ACE_GUARD_RETURN (ACE_Thread_Mutex, guard, match_status_mutex_, -1 );
119
- while (match_status_ == UNMATCHED ) {
116
+ while (match_status_ != MATCHED ) {
120
117
if (match_cond_.wait () != 0 ) {
121
118
return -1 ;
122
119
}
@@ -128,11 +125,12 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
128
125
{
129
126
// In the main thread, wait for the publisher to deassociate
130
127
ACE_GUARD_RETURN (ACE_Thread_Mutex, guard, match_status_mutex_, -1 );
131
- while (match_status_ == MATCHED ) {
128
+ while (match_status_ != UNMATCHED ) {
132
129
if (unmatch_cond_.wait () != 0 ) {
133
130
return -1 ;
134
131
}
135
132
}
133
+ return 0 ;
136
134
}
137
135
138
136
private:
0 commit comments