summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2015-02-09 09:01:06 +0100
committerLutz Bichler <Lutz.Bichler@bmw.de>2015-02-09 09:01:06 +0100
commit0900dc5544fc68f9dca7e298cab851b99015c000 (patch)
tree58f8a2f99ae1d09c5f570d7c6cd3440df8873114
parent2ad98349f4038b983fed65b5b3b6d5a7047d7180 (diff)
downloadvSomeIP-0900dc5544fc68f9dca7e298cab851b99015c000.tar.gz
Updated udp service configuration to avoid an error message about an
unconfigured port. Fix a bug that let the routing manager try to access an already removed service group.
-rw-r--r--config/vsomeip-udp-service.json14
-rw-r--r--implementation/routing/src/routing_manager_impl.cpp15
2 files changed, 20 insertions, 9 deletions
diff --git a/config/vsomeip-udp-service.json b/config/vsomeip-udp-service.json
index c07302c..5d7fa5d 100644
--- a/config/vsomeip-udp-service.json
+++ b/config/vsomeip-udp-service.json
@@ -1,5 +1,5 @@
{
- "unicast" : "192.168.56.104",
+ "unicast" : "192.168.56.101",
"logging" :
{
"level" : "debug",
@@ -75,7 +75,17 @@
"events" : [ "0x777", "0x779" ]
}
]
- }
+ },
+ {
+ "service" : "0x1235",
+ "instance" : "0x5678",
+ "unreliable" : "30509",
+ "multicast" :
+ {
+ "address" : "224.225.226.234",
+ "port" : "32344"
+ }
+ }
]
}
],
diff --git a/implementation/routing/src/routing_manager_impl.cpp b/implementation/routing/src/routing_manager_impl.cpp
index 53730c9..2ffcdf8 100644
--- a/implementation/routing/src/routing_manager_impl.cpp
+++ b/implementation/routing/src/routing_manager_impl.cpp
@@ -663,8 +663,7 @@ services_t routing_manager_impl::get_offered_services(
return (find_servicegroup->second->get_services());
}
- return (its_offers);
-}
+ return (its_offers);}
///////////////////////////////////////////////////////////////////////////////
// PRIVATE
@@ -1063,11 +1062,13 @@ void routing_manager_impl::del_routing_info(service_t _service,
}
if (!its_info->get_endpoint(!_reliable)) {
- its_info->get_group()->remove_service(_service, _instance);
- if (1 >= services_[_service].size()) {
- services_.erase(_service);
- } else {
- services_[_service].erase(_instance);
+ if (its_info->get_group()) {
+ its_info->get_group()->remove_service(_service, _instance);
+ if (1 >= services_[_service].size()) {
+ services_.erase(_service);
+ } else {
+ services_[_service].erase(_instance);
+ }
}
} else {
its_info->set_endpoint(its_empty_endpoint, _reliable);