From fef0a1fc1b490590f9f6da037e885d1165ac3751 Mon Sep 17 00:00:00 2001 From: chanywa Date: Fri, 18 Aug 2017 18:48:59 +0900 Subject: [PATCH] Fix bugs due to failure requesting search-place Change-Id: I0ec1d32bf9dd2da5db0d3ecceb5e0ef92871549c --- maps-plugin-here.changes | 5 +++++ packaging/maps-plugin-here.spec | 2 +- src/here_place.cpp | 19 +++++++++++++------ src/here_userconsent.cpp | 5 +++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/maps-plugin-here.changes b/maps-plugin-here.changes index e3c489c..71d5aa0 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-here_0.3.28 +[Date] 18 Aug 2017 +[Title] Fix bugs due to failure requesting search-place. +[Developer] Seechan Kim + [Version] maps-plugin-here_0.3.27 [Date] 17 Aug 2017 [Title] Update heremaps-engine to prevent crashes diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index 45c15c3..829b7d0 100644 --- a/packaging/maps-plugin-here.spec +++ b/packaging/maps-plugin-here.spec @@ -1,6 +1,6 @@ Name: maps-plugin-here Summary: Tizen HERE Maps Plug-in Library -Version: 0.3.27 +Version: 0.3.28 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/here_place.cpp b/src/here_place.cpp index a2082ea..81c528c 100644 --- a/src/here_place.cpp +++ b/src/here_place.cpp @@ -360,6 +360,7 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply) Category hereCate; maps_place_category_h mapsCate; maps_place_rating_h mapsRating; + std::vector pendingUrlList; int error = MAPS_ERROR_UNKNOWN, sub_error; bool is_valid, isPending; @@ -452,15 +453,14 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply) /* vicinity */ - /* If needed PlaceDetails information, postpone to send a reply */ + /* If needed PlaceDetails information, postpone what to reply */ if(__sending_place_details_query_automatically && !m_bReplyWithList) { hereLinkObj = herePlaceIt->GetLinkObject(); if (!hereLinkObj.GetHref().empty() && !hereLinkObj.GetId().empty()) { - if (StartPlaceDetailsInternal(hereLinkObj.GetHref().c_str()) == HERE_ERROR_NONE) { - m_PlaceList.push_back(mapsPlace); - isPending = true; - MAPS_LOGD("Add maps_place_h to the pending list. id=%s", hereLinkObj.GetId().data()); - } + isPending = true; + m_PlaceList.push_back(mapsPlace); + pendingUrlList.push_back(hereLinkObj.GetHref()); + MAPS_LOGD("Add maps_place_h to the pending list. id=%s", hereLinkObj.GetId().data()); } } @@ -519,6 +519,13 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply) } + if (pendingUrlList.size() > 0) { + std::vector::iterator it; + for (it = pendingUrlList.begin(); it != pendingUrlList.end(); it++) + StartPlaceDetailsInternal((*it).c_str()); + return; + } + if (!m_bReplyFlushed && (m_nReplyCnt == 0 || m_nReplyIdx == m_nReplyCnt)) { if (m_nReplyCnt == 0) error = MAPS_ERROR_NOT_FOUND; diff --git a/src/here_userconsent.cpp b/src/here_userconsent.cpp index fb5ac0b..7da2491 100644 --- a/src/here_userconsent.cpp +++ b/src/here_userconsent.cpp @@ -76,6 +76,11 @@ HereUserConsent::~HereUserConsent() here_error_e HereUserConsent::GetUserConsent(bool *consent) { + if (ApplicationContext::GetInstance().GetUserConsent() == true) { + *consent = true; + return HERE_ERROR_NONE; + } + const int testAppIdCount = 7; const char* testAppIdList[testAppIdCount] = { "org.tizen.capi-maps-service-native-utc", -- 2.7.4