Update heremaps-engine to prevent crashes. 59/142759/5
authorchanywa <cbible.kim@samsung.com>
Mon, 7 Aug 2017 07:11:13 +0000 (16:11 +0900)
committerSeechan Kim <cbible.kim@samsung.com>
Tue, 8 Aug 2017 00:44:38 +0000 (00:44 +0000)
Change-Id: I0f4de3a87e34215678ffbdbb8f13f13515f9fc2a

14 files changed:
inc/here_manager.h
lib/aarch64/libheremaps-engine.so.1
lib/aarch64/libheremaps-engine.so.1.0.6_33 [moved from lib/aarch64/libheremaps-engine.so.1.0.6_32 with 69% similarity]
lib/armv7l/libheremaps-engine.so.1
lib/armv7l/libheremaps-engine.so.1.0.6_33 [moved from lib/armv7l/libheremaps-engine.so.1.0.6_32 with 67% similarity]
lib/i586/libheremaps-engine.so.1
lib/i586/libheremaps-engine.so.1.0.6_33 [moved from lib/i586/libheremaps-engine.so.1.0.6_32 with 68% similarity]
lib/x86_64/libheremaps-engine.so.1
lib/x86_64/libheremaps-engine.so.1.0.6_33 [moved from lib/x86_64/libheremaps-engine.so.1.0.6_32 with 68% similarity]
maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_api.cpp
src/here_multirevgeocode.cpp
src/here_revgeocode.cpp

index 0be6dc6..cbd136b 100644 (file)
@@ -90,7 +90,7 @@ private:
        here_error_e SetCredentials();
        static bool AppInfoMetadataCb(const char *metadata_key, const char *metadata_value, void *user_data);
        static void NetworkStateChangedIndCb(connection_type_e type, void *user_data);
-       static here_error_e ConvertNetworkErrorCode(const int nErrorCode);
+       here_error_e ConvertNetworkErrorCode(const int nErrorCode);
        connection_h m_hConnection;
        static int m_nRefCnt;
        static HereManager *m_pHereManager;
index 5644257..6b80f25 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_32
\ No newline at end of file
+libheremaps-engine.so.1.0.6_33
\ No newline at end of file
similarity index 69%
rename from lib/aarch64/libheremaps-engine.so.1.0.6_32
rename to lib/aarch64/libheremaps-engine.so.1.0.6_33
index c4a4de7..61d085b 100755 (executable)
Binary files a/lib/aarch64/libheremaps-engine.so.1.0.6_32 and b/lib/aarch64/libheremaps-engine.so.1.0.6_33 differ
index 5644257..6b80f25 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_32
\ No newline at end of file
+libheremaps-engine.so.1.0.6_33
\ No newline at end of file
similarity index 67%
rename from lib/armv7l/libheremaps-engine.so.1.0.6_32
rename to lib/armv7l/libheremaps-engine.so.1.0.6_33
index 9765535..4126fbd 100755 (executable)
Binary files a/lib/armv7l/libheremaps-engine.so.1.0.6_32 and b/lib/armv7l/libheremaps-engine.so.1.0.6_33 differ
index 5644257..6b80f25 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_32
\ No newline at end of file
+libheremaps-engine.so.1.0.6_33
\ No newline at end of file
similarity index 68%
rename from lib/i586/libheremaps-engine.so.1.0.6_32
rename to lib/i586/libheremaps-engine.so.1.0.6_33
index 55202c0..eaaddd2 100755 (executable)
Binary files a/lib/i586/libheremaps-engine.so.1.0.6_32 and b/lib/i586/libheremaps-engine.so.1.0.6_33 differ
index 5644257..6b80f25 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_32
\ No newline at end of file
+libheremaps-engine.so.1.0.6_33
\ No newline at end of file
similarity index 68%
rename from lib/x86_64/libheremaps-engine.so.1.0.6_32
rename to lib/x86_64/libheremaps-engine.so.1.0.6_33
index 264491c..84eadff 100755 (executable)
Binary files a/lib/x86_64/libheremaps-engine.so.1.0.6_32 and b/lib/x86_64/libheremaps-engine.so.1.0.6_33 differ
index a7dcaea..0830aa9 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.26
+[Date]      07 Oct 2017
+[Title]     Update heremaps-engine to prevent crashes
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.25
 [Date]      26 July 2017
 [Title]     Move vector erase behind TerminateService
index aaa67bf..24e46a9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.25
+Version:    0.3.26
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index c0bfe26..e487bdb 100644 (file)
@@ -57,9 +57,7 @@ int HerePluginShutdown(maps_plugin_h hPlugin)
        if (!hPlugin)
                return HERE_ERROR_INVALID_PARAMETER;
 
-       if (HereManager::GetHandler())
-               HereManager::GetHandler()->Close();
-
+       HereManager::Close();
        return HERE_ERROR_NONE;
 }
 
index 8805f71..76abc81 100644 (file)
@@ -113,66 +113,66 @@ void HereMultiRevGeocode::OnMultiReverseReply(const MultiReverseReply& Reply)
 
        for (size_t i = 0; i < (size_t)nResults; i++)
        {
-               maps_error_e error = (maps_error_e)maps_address_create(&pAddr);
+               if ((pResult = (Result*)Reply.GetResult(i)) == NULL) continue;
+               if (maps_address_create(&pAddr) != MAPS_ERROR_NONE) continue;
 
-               if(error == MAPS_ERROR_NONE) {
-                       pResult = (Result*)Reply.GetResult(i);
 
-                       if (pResult) {
-                               Address tmpAddr = (pResult->GetLocation()).GetAddress();
+               Address tmpAddr = (pResult->GetLocation()).GetAddress();
 
-                               if(!tmpAddr.GetHouseNumber().empty())
-                                       maps_address_set_building_number(pAddr, tmpAddr.GetHouseNumber().c_str());
+               if(!tmpAddr.GetHouseNumber().empty())
+                       maps_address_set_building_number(pAddr, tmpAddr.GetHouseNumber().c_str());
 
-                               if(!tmpAddr.GetStreet().empty())
-                                       maps_address_set_street(pAddr, tmpAddr.GetStreet().c_str());
+               if(!tmpAddr.GetStreet().empty())
+                       maps_address_set_street(pAddr, tmpAddr.GetStreet().c_str());
 
-                               if(!tmpAddr.GetDistrict().empty())
-                                       maps_address_set_district(pAddr, tmpAddr.GetDistrict().c_str());
+               if(!tmpAddr.GetDistrict().empty())
+                       maps_address_set_district(pAddr, tmpAddr.GetDistrict().c_str());
 
-                               if(!tmpAddr.GetCity().empty())
-                                       maps_address_set_city(pAddr, tmpAddr.GetCity().c_str());
+               if(!tmpAddr.GetCity().empty())
+                       maps_address_set_city(pAddr, tmpAddr.GetCity().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountyName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_county(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetCounty().empty())
-                                       maps_address_set_county(pAddr, tmpAddr.GetCounty().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountyName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_county(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetCounty().empty())
+                       maps_address_set_county(pAddr, tmpAddr.GetCounty().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("StateName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_state(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetState().empty())
-                                       maps_address_set_state(pAddr, tmpAddr.GetState().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("StateName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_state(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetState().empty())
+                       maps_address_set_state(pAddr, tmpAddr.GetState().c_str());
 
-                               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountryName");
-                               if (additionalDataValue && !additionalDataValue->empty())
-                                       maps_address_set_country(pAddr, additionalDataValue->c_str());
-                               else if (!tmpAddr.GetCountry().empty())
-                                       maps_address_set_country(pAddr, tmpAddr.GetCountry().c_str());
+               additionalDataValue = (String*)tmpAddr.GetAdditionalDataValue("CountryName");
+               if (additionalDataValue && !additionalDataValue->empty())
+                       maps_address_set_country(pAddr, additionalDataValue->c_str());
+               else if (!tmpAddr.GetCountry().empty())
+                       maps_address_set_country(pAddr, tmpAddr.GetCountry().c_str());
 
-                               if(!tmpAddr.GetCountry().empty())
-                                       maps_address_set_country_code(pAddr, tmpAddr.GetCountry().c_str());
+               if(!tmpAddr.GetCountry().empty())
+                       maps_address_set_country_code(pAddr, tmpAddr.GetCountry().c_str());
 
-                               if(!tmpAddr.GetPostalCode().empty())
-                                       maps_address_set_postal_code(pAddr, tmpAddr.GetPostalCode().c_str());
+               if(!tmpAddr.GetPostalCode().empty())
+                       maps_address_set_postal_code(pAddr, tmpAddr.GetPostalCode().c_str());
 
-                               if(!tmpAddr.GetLabel().empty())
-                                       maps_address_set_freetext(pAddr, tmpAddr.GetLabel().c_str());
-                       }
-                       if (maps_address_list_append(address_list, pAddr) != MAPS_ERROR_NONE)
-                               maps_address_destroy(pAddr);
-                       pAddr = NULL;
-               }
+               if(!tmpAddr.GetLabel().empty())
+                       maps_address_set_freetext(pAddr, tmpAddr.GetLabel().c_str());
+
+               if (maps_address_list_append(address_list, pAddr) != MAPS_ERROR_NONE)
+                       maps_address_destroy(pAddr);
        }
 
+
+       int address_list_length = 0;
+       maps_address_list_get_length(address_list, &address_list_length);
+
        if (m_bCanceled || !m_pCbFunc) {
                maps_address_list_destroy(address_list);
-       } else if (nResults <= 0) {
+       } else if (address_list_length <= 0) {
                maps_address_list_destroy(address_list);
                ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NOT_FOUND, m_nReqId, 0, NULL, m_pUserData);
        } else {
-               ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NONE, m_nReqId, nResults, address_list, m_pUserData);
+               ((maps_service_multi_reverse_geocode_cb)m_pCbFunc)(MAPS_ERROR_NONE, m_nReqId, address_list_length, address_list, m_pUserData);
        }
 
        delete this;
index ea3c4b8..b068d2a 100644 (file)
@@ -183,9 +183,12 @@ void HereRevGeocode::OnGeoCoderReply(const GeoCoderReply& Reply)
 
        if (m_bCanceled) {
                maps_address_destroy(hAddr);
+       }
+       else if (error != MAPS_ERROR_NONE) {
+               maps_address_destroy(hAddr);
+               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, 0, NULL, m_pUserData);
        } else {
-               int nResult = (error == MAPS_ERROR_NONE ? 1 : 0);
-               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, nResult, hAddr, m_pUserData);
+               ((maps_service_reverse_geocode_cb)m_pCbFunc)(error, m_nReqId, 0, 1, hAddr, m_pUserData);
        }
 
        delete this;