From: chanywa Date: Mon, 7 Aug 2017 07:11:13 +0000 (+0900) Subject: Update heremaps-engine to prevent crashes. X-Git-Tag: submit/tizen/20170808.014602~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d19ab58a903281507c9353e28ae90a468eae2be0;p=platform%2Fcore%2Flocation%2Fmaps-plugin-here.git Update heremaps-engine to prevent crashes. Change-Id: I0f4de3a87e34215678ffbdbb8f13f13515f9fc2a --- diff --git a/inc/here_manager.h b/inc/here_manager.h index 0be6dc6..cbd136b 100644 --- a/inc/here_manager.h +++ b/inc/here_manager.h @@ -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; diff --git a/lib/aarch64/libheremaps-engine.so.1 b/lib/aarch64/libheremaps-engine.so.1 index 5644257..6b80f25 120000 --- a/lib/aarch64/libheremaps-engine.so.1 +++ b/lib/aarch64/libheremaps-engine.so.1 @@ -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 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 index 0000000..61d085b Binary files /dev/null and b/lib/aarch64/libheremaps-engine.so.1.0.6_33 differ diff --git a/lib/armv7l/libheremaps-engine.so.1 b/lib/armv7l/libheremaps-engine.so.1 index 5644257..6b80f25 120000 --- a/lib/armv7l/libheremaps-engine.so.1 +++ b/lib/armv7l/libheremaps-engine.so.1 @@ -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 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 index 0000000..4126fbd Binary files /dev/null and b/lib/armv7l/libheremaps-engine.so.1.0.6_33 differ diff --git a/lib/i586/libheremaps-engine.so.1 b/lib/i586/libheremaps-engine.so.1 index 5644257..6b80f25 120000 --- a/lib/i586/libheremaps-engine.so.1 +++ b/lib/i586/libheremaps-engine.so.1 @@ -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 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 index 0000000..eaaddd2 Binary files /dev/null and b/lib/i586/libheremaps-engine.so.1.0.6_33 differ diff --git a/lib/x86_64/libheremaps-engine.so.1 b/lib/x86_64/libheremaps-engine.so.1 index 5644257..6b80f25 120000 --- a/lib/x86_64/libheremaps-engine.so.1 +++ b/lib/x86_64/libheremaps-engine.so.1 @@ -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 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 index 0000000..84eadff Binary files /dev/null and b/lib/x86_64/libheremaps-engine.so.1.0.6_33 differ diff --git a/maps-plugin-here.changes b/maps-plugin-here.changes index a7dcaea..0830aa9 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -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 + [Version] maps-plugin-here_0.3.25 [Date] 26 July 2017 [Title] Move vector erase behind TerminateService diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index aaa67bf..24e46a9 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.25 +Version: 0.3.26 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/here_api.cpp b/src/here_api.cpp index c0bfe26..e487bdb 100644 --- a/src/here_api.cpp +++ b/src/here_api.cpp @@ -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; } diff --git a/src/here_multirevgeocode.cpp b/src/here_multirevgeocode.cpp index 8805f71..76abc81 100644 --- a/src/here_multirevgeocode.cpp +++ b/src/here_multirevgeocode.cpp @@ -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; diff --git a/src/here_revgeocode.cpp b/src/here_revgeocode.cpp index ea3c4b8..b068d2a 100644 --- a/src/here_revgeocode.cpp +++ b/src/here_revgeocode.cpp @@ -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;