summaryrefslogtreecommitdiff
path: root/src/navigation
diff options
context:
space:
mode:
Diffstat (limited to 'src/navigation')
-rw-r--r--src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx14
-rw-r--r--src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx28
-rw-r--r--src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx3
3 files changed, 31 insertions, 14 deletions
diff --git a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
index cc64b72..a7b8419 100644
--- a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
+++ b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
@@ -410,8 +410,10 @@ GuidanceObj::GetDestinationInformation(uint32_t& Distance, uint32_t& TravelTime,
struct attr destination_time, destination_length;
struct map_rect *mr=get_map_rect();
struct item *item;
- if (!mr)
+ if (!mr) {
+ LOG_ERROR_MSG(gCtx,"GetDestinationInformation: failed to get map rect");
throw DBus::ErrorFailed("internal error:failed to get map rect");
+ }
while (item=map_rect_get_item(mr)) {
if (item_coord_get(item, &c[idx], 1)) {
if (!idx) {
@@ -600,6 +602,10 @@ void
GuidanceObj::GetGuidanceDetails(bool& voiceGuidance, bool& vehicleOnTheRoad, bool& isDestinationReached, int32_t& maneuver)
{
struct map_rect *mr=get_map_rect();
+ if (!mr) {
+ LOG_ERROR_MSG(gCtx,"Failed to get map rect");
+ return;
+ }
struct item *item;
item=get_item(mr);
std::string road_name_after_maneuver;
@@ -618,7 +624,11 @@ void
GuidanceObj::GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers,std::vector< ::DBus::Struct< std::vector< ::DBus::Struct< std::string, std::vector< ::DBus::Struct< int32_t, std::string > >, std::string > >, std::string, std::string, std::string, std::string, uint16_t, int32_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, int32_t, std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > > >& maneuversList)
{
struct map_rect *mr=get_map_rect();
- struct item *item;
+ if (!mr) {
+ LOG_ERROR_MSG(gCtx,"Failed to get map rect");
+ return;
+ }
+ struct item *item;
uint16_t maneuverIndex;
std::map< int32_t, DBusCommonAPIVariant >::iterator it;
diff --git a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
index 99156d6..6e68da5 100644
--- a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
+++ b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
@@ -657,11 +657,15 @@ void
RoutingObj::GetRouteSegments(int16_t detailLevel , const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& RouteSegments)
{
struct map *m=route_get_map(m_route.u.route);
- if (!m)
- throw DBus::ErrorFailed("internal error:failed to get route map");
+ if (!m){
+ LOG_ERROR_MSG(gCtx,"GetRouteSegments: failed to get route map");
+ throw DBus::ErrorFailed("internal error:failed to get route map");
+ }
struct map_rect *mr=map_rect_new(m, NULL);
- if (!mr)
- throw DBus::ErrorFailed("internal error:failed to create route map rect");
+ if (!mr){
+ LOG_ERROR_MSG(gCtx,"GetRouteSegments: failed to create route map rect");
+ throw DBus::ErrorFailed("internal error:failed to create route map rect");
+ }
struct item *item;
struct coord c[128],last;
int count,i;
@@ -749,12 +753,16 @@ RoutingObj::GetRouteBoundingBox(::DBus::Struct< ::DBus::Struct< double, double >
struct map *m=route_get_map(m_route.u.route);
struct item *item;
- if (!m)
- throw DBus::ErrorFailed("internal error:failed to get route map");
- struct map_rect *mr=map_rect_new(m, NULL);
- if (!mr)
- throw DBus::ErrorFailed("internal error:failed to create route map rect");
- while ((item=map_rect_get_item(mr))) {
+ if (!m){
+ LOG_ERROR_MSG(gCtx,"GetRouteBoundingBox: failed to get route map");
+ throw DBus::ErrorFailed("internal error:failed to get route map");
+ }
+ struct map_rect *mr=map_rect_new(m, NULL);
+ if (!mr){
+ LOG_ERROR_MSG(gCtx,"GetRouteBoundingBox: failed to create route map rect");
+ throw DBus::ErrorFailed("internal error:failed to create route map rect");
+ }
+ while ((item=map_rect_get_item(mr))) {
struct coord c[128];
int count,i;
do {
diff --git a/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx b/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
index 9680be7..951e670 100644
--- a/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
+++ b/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
@@ -239,7 +239,6 @@ class ContentAccessModule
{
struct attr label;
struct coord c;
- LOG_DEBUG_MSG(gCtx,"adding poi");
::DBus::Struct< uint32_t, std::string, uint32_t, ::DBus::Struct< double, double, double >, uint16_t, std::vector< ::DBus::Struct< uint32_t, int32_t, DBusCommonAPIVariant > > > result;
::DBus::Struct< uint32_t, int32_t, DBusCommonAPIVariant > attribute;
bool stringMatched=false;
@@ -402,7 +401,7 @@ class ContentAccessModule
g.lat=location._1;
g.lng=location._2;
transform_from_geo(projection_mg, &g, &m_center);
- LOG_DEBUG(gCtx,"c 0x%x,0x%x",m_center.x,m_center.y);
+ LOG_DEBUG(gCtx,"center 0x%x,0x%x",m_center.x,m_center.y);
m_scale=transform_scale(m_center.y);
int d=m_max_radius*10/m_scale;
m_selection.next=NULL;