diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2017-03-07 05:30:55 -0800 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2017-03-07 05:30:55 -0800 |
commit | c35b82a9459b866ab22bc3cabe274c7b36bca290 (patch) | |
tree | ed1b4c031345ef7f13ff061cd3d3cbd9d2f9afe8 | |
parent | 199b12ef4b4abe120624a757fcbe8f8cd54c3712 (diff) | |
download | vSomeIP-c35b82a9459b866ab22bc3cabe274c7b36bca290.tar.gz |
vSomeIP 2.6.12.6.1
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/subscribe-sample.cpp | 6 | ||||
-rw-r--r-- | implementation/routing/src/event.cpp | 4 |
4 files changed, 8 insertions, 7 deletions
@@ -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<vsomeip::message> &_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<client_t> event::get_subscribers() { std::set<client_t> its_subscribers; std::lock_guard<std::mutex> 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<std::mutex> its_lock(eventgroups_mutex_); - for (auto e : eventgroups_) + for (auto &e : eventgroups_) e.second.clear(); } |