| 2850 | |
| 2851 | |
| 2852 | void |
| 2853 | DataReaderImpl::coherent_changes_completed(DataReaderImpl* reader) |
| 2854 | { |
| 2855 | RcHandle<SubscriberImpl> subscriber = get_subscriber_servant(); |
| 2856 | if (!subscriber) { |
| 2857 | return; |
| 2858 | } |
| 2859 | |
| 2860 | subscriber->set_status_changed_flag(::DDS::DATA_ON_READERS_STATUS, true); |
| 2861 | this->set_status_changed_flag(::DDS::DATA_AVAILABLE_STATUS, true); |
| 2862 | |
| 2863 | ::DDS::SubscriberListener_var sub_listener = |
| 2864 | subscriber->listener_for(::DDS::DATA_ON_READERS_STATUS); |
| 2865 | if (!CORBA::is_nil(sub_listener.in())) |
| 2866 | { |
| 2867 | if (!is_bit()) { |
| 2868 | this->set_status_changed_flag(::DDS::DATA_AVAILABLE_STATUS, false); |
| 2869 | subscriber->set_status_changed_flag(::DDS::DATA_ON_READERS_STATUS, false); |
| 2870 | if (reader == this) { |
| 2871 | // Release the sample_lock before listener callback. |
| 2872 | ACE_GUARD(Reverse_Lock_t, unlock_guard, reverse_sample_lock_); |
| 2873 | sub_listener->on_data_on_readers(subscriber.in()); |
| 2874 | } |
| 2875 | } else { |
| 2876 | TheServiceParticipant->job_queue()->enqueue(make_rch<OnDataOnReaders>(subscriber, sub_listener, rchandle_from(this), reader == this, true)); |
| 2877 | } |
| 2878 | } |
| 2879 | else |
| 2880 | { |
| 2881 | subscriber->notify_status_condition(); |
| 2882 | |
| 2883 | ::DDS::DataReaderListener_var listener = |
| 2884 | this->listener_for (::DDS::DATA_AVAILABLE_STATUS); |
| 2885 | |
| 2886 | if (!CORBA::is_nil(listener.in())) |
| 2887 | { |
| 2888 | if (!is_bit()) { |
| 2889 | set_status_changed_flag(::DDS::DATA_AVAILABLE_STATUS, false); |
| 2890 | subscriber->set_status_changed_flag(::DDS::DATA_ON_READERS_STATUS, false); |
| 2891 | if (reader == this) { |
| 2892 | // Release the sample_lock before listener callback. |
| 2893 | ACE_GUARD(Reverse_Lock_t, unlock_guard, reverse_sample_lock_); |
| 2894 | listener->on_data_available(this); |
| 2895 | } else { |
| 2896 | listener->on_data_available(this); |
| 2897 | } |
| 2898 | } else { |
| 2899 | TheServiceParticipant->job_queue()->enqueue(make_rch<OnDataAvailable>(listener, rchandle_from(this), reader == this, true, true)); |
| 2900 | } |
| 2901 | } |
| 2902 | else |
| 2903 | { |
| 2904 | this->notify_status_condition(); |
| 2905 | } |
| 2906 | } |
| 2907 | } |
| 2908 | |
| 2909 |
no test coverage detected