Fix bugs due to failure requesting search-place 24/144924/1
authorchanywa <cbible.kim@samsung.com>
Fri, 18 Aug 2017 10:29:55 +0000 (19:29 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 18 Aug 2017 10:29:55 +0000 (19:29 +0900)
Change-Id: I85d86d7bcae698c87284e1e72b6405c29eaedf73

maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_place.cpp

index cec96f445e279218c2aa517b89493813618c2f59..8c15e2cbf5115ec7d05bb910c5c18c7820b31d8a 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.21
+[Date]      18 Aug 2017
+[Title]     Fix bugs due to failure requesting search-place.
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.20
 [Date]      11 Aug 2017
 [Title]     Update heremaps-engine to prevent crashes
index 84836ebb9aff88dc8bc5505b4ede2ab20e34334b..98b05bf5227f624ad47440e44c62b8c42dcc5114 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.20
+Version:    0.3.21
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index a2082ea9b3f702994316c68cefaaef55c85facf3..81c528c9fac645d7dd510f1c8a0b2f442fa5f110 100644 (file)
@@ -360,6 +360,7 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply)
        Category hereCate;
        maps_place_category_h mapsCate;
        maps_place_rating_h mapsRating;
+       std::vector<String> 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<String>::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;