From c35b82a9459b866ab22bc3cabe274c7b36bca290 Mon Sep 17 00:00:00 2001 From: Juergen Gehring Date: Tue, 7 Mar 2017 05:30:55 -0800 Subject: vSomeIP 2.6.1 --- CHANGES | 3 +++ CMakeLists.txt | 2 +- examples/subscribe-sample.cpp | 6 ++---- implementation/routing/src/event.cpp | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 7ca9b53..f8f5401 100644 --- a/CHANGES +++ b/CHANGES @@ -285,3 +285,6 @@ v2.6.0 messages and lower CPU load - Extend public application interface with second unsubscribe method with additional event parameter + +v2.6.1 +- Fixed clearing of subscribers on stop offer service diff --git a/CMakeLists.txt b/CMakeLists.txt index 10ed61c..f53cdf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project (vsomeip) set (VSOMEIP_MAJOR_VERSION 2) set (VSOMEIP_MINOR_VERSION 6) -set (VSOMEIP_PATCH_VERSION 0) +set (VSOMEIP_PATCH_VERSION 1) set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION}) set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentatin/doxygen.in set (CMAKE_VERBOSE_MAKEFILE off) diff --git a/examples/subscribe-sample.cpp b/examples/subscribe-sample.cpp index 2526112..5350263 100644 --- a/examples/subscribe-sample.cpp +++ b/examples/subscribe-sample.cpp @@ -55,6 +55,8 @@ public: SAMPLE_EVENT_ID, its_groups, true); + app_->subscribe(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID, SAMPLE_EVENTGROUP_ID); + return true; } @@ -87,10 +89,6 @@ public: << "] is " << (_is_available ? "available." : "NOT available.") << std::endl; - - if (_is_available && SAMPLE_SERVICE_ID == _service && SAMPLE_INSTANCE_ID == _instance) { - app_->subscribe(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID, SAMPLE_EVENTGROUP_ID); - } } void on_message(const std::shared_ptr &_response) { diff --git a/implementation/routing/src/event.cpp b/implementation/routing/src/event.cpp index 023987f..df39b1c 100644 --- a/implementation/routing/src/event.cpp +++ b/implementation/routing/src/event.cpp @@ -358,14 +358,14 @@ bool event::has_subscriber(eventgroup_t _eventgroup, client_t _client) { std::set event::get_subscribers() { std::set its_subscribers; std::lock_guard its_lock(eventgroups_mutex_); - for (auto e : eventgroups_) + for (const auto &e : eventgroups_) its_subscribers.insert(e.second.begin(), e.second.end()); return its_subscribers; } void event::clear_subscribers() { std::lock_guard its_lock(eventgroups_mutex_); - for (auto e : eventgroups_) + for (auto &e : eventgroups_) e.second.clear(); } -- cgit v1.2.1