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

18 files changed:
inc/here_manager.h
lib/aarch64/libheremaps-engine.so.1
lib/aarch64/libheremaps-engine.so.1.0.6_32 [deleted file]
lib/aarch64/libheremaps-engine.so.1.0.6_33 [new file with mode: 0755]
lib/armv7l/libheremaps-engine.so.1
lib/armv7l/libheremaps-engine.so.1.0.6_32 [deleted file]
lib/armv7l/libheremaps-engine.so.1.0.6_33 [new file with mode: 0755]
lib/i586/libheremaps-engine.so.1
lib/i586/libheremaps-engine.so.1.0.6_32 [deleted file]
lib/i586/libheremaps-engine.so.1.0.6_33 [new file with mode: 0755]
lib/x86_64/libheremaps-engine.so.1
lib/x86_64/libheremaps-engine.so.1.0.6_32 [deleted file]
lib/x86_64/libheremaps-engine.so.1.0.6_33 [new file with mode: 0755]
maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_api.cpp
src/here_multirevgeocode.cpp
src/here_revgeocode.cpp

index 0be6dc6f0d7fb130bbb7f58b3d2005f51293840e..cbd136bff01c2f47b36b9f4ada770ebe3162bb0a 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 5644257f424d61700f7363881cafe437ecfd1b17..6b80f25539a2a3a903b249fe0a8ba4461443cf8b 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
diff --git a/lib/aarch64/libheremaps-engine.so.1.0.6_32 b/lib/aarch64/libheremaps-engine.so.1.0.6_32
deleted file mode 100755 (executable)
index c4a4de7..0000000
Binary files a/lib/aarch64/libheremaps-engine.so.1.0.6_32 and /dev/null differ
diff --git a/lib/aarch64/libheremaps-engine.so.1.0.6_33 b/lib/aarch64/libheremaps-engine.so.1.0.6_33
new file mode 100755 (executable)
index 0000000..61d085b
Binary files /dev/null and b/lib/aarch64/libheremaps-engine.so.1.0.6_33 differ
index 5644257f424d61700f7363881cafe437ecfd1b17..6b80f25539a2a3a903b249fe0a8ba4461443cf8b 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
diff --git a/lib/armv7l/libheremaps-engine.so.1.0.6_32 b/lib/armv7l/libheremaps-engine.so.1.0.6_32
deleted file mode 100755 (executable)
index 9765535..0000000
Binary files a/lib/armv7l/libheremaps-engine.so.1.0.6_32 and /dev/null differ
diff --git a/lib/armv7l/libheremaps-engine.so.1.0.6_33 b/lib/armv7l/libheremaps-engine.so.1.0.6_33
new file mode 100755 (executable)
index 0000000..4126fbd
Binary files /dev/null and b/lib/armv7l/libheremaps-engine.so.1.0.6_33 differ
index 5644257f424d61700f7363881cafe437ecfd1b17..6b80f25539a2a3a903b249fe0a8ba4461443cf8b 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
diff --git a/lib/i586/libheremaps-engine.so.1.0.6_32 b/lib/i586/libheremaps-engine.so.1.0.6_32
deleted file mode 100755 (executable)
index 55202c0..0000000
Binary files a/lib/i586/libheremaps-engine.so.1.0.6_32 and /dev/null differ
diff --git a/lib/i586/libheremaps-engine.so.1.0.6_33 b/lib/i586/libheremaps-engine.so.1.0.6_33
new file mode 100755 (executable)
index 0000000..eaaddd2
Binary files /dev/null and b/lib/i586/libheremaps-engine.so.1.0.6_33 differ
index 5644257f424d61700f7363881cafe437ecfd1b17..6b80f25539a2a3a903b249fe0a8ba4461443cf8b 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
diff --git a/lib/x86_64/libheremaps-engine.so.1.0.6_32 b/lib/x86_64/libheremaps-engine.so.1.0.6_32
deleted file mode 100755 (executable)
index 264491c..0000000
Binary files a/lib/x86_64/libheremaps-engine.so.1.0.6_32 and /dev/null differ
diff --git a/lib/x86_64/libheremaps-engine.so.1.0.6_33 b/lib/x86_64/libheremaps-engine.so.1.0.6_33
new file mode 100755 (executable)
index 0000000..84eadff
Binary files /dev/null and b/lib/x86_64/libheremaps-engine.so.1.0.6_33 differ
index a7dcaea749613a6293c80ef0ec9d3de85fb2141f..0830aa984794a80de0b35b8bdc603c0f12021312 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 aaa67bfc09ace8ce484ec9d7cd82edab06a34dd6..24e46a9488bef04c2a6fedb14694ac31066dbc09 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 c0bfe26fb081ae2a06fd9e7689a333fac2dd3a4d..e487bdb9d56a79a2b67756c20e8740e44dce8b4c 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 8805f71deb5391d2a32742c6510656d97084e1b4..76abc8155c38fa1f8191e5d7fd8e47a1481efd6f 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 ea3c4b8d55f46687fec6cc3eff2a138b50d92f4b..b068d2a52b4b9f890717cb824c012ad2071b1565 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;