diff options
author | chanywa <cbible.kim@samsung.com> | 2017-07-19 07:20:19 +0900 |
---|---|---|
committer | chanywa <cbible.kim@samsung.com> | 2017-08-11 10:46:45 +0900 |
commit | f9f9dbfd2c9f89329698f06ff873997baf397d62 (patch) | |
tree | 8283ec4d0dcf51dbd21eda0c460e71dfbc6f0ac6 | |
parent | d36ba2e1b7d88284e6df45d95bfb288cfc10115b (diff) | |
download | maps-plugin-here-f9f9dbfd2c9f89329698f06ff873997baf397d62.tar.gz maps-plugin-here-f9f9dbfd2c9f89329698f06ff873997baf397d62.tar.bz2 maps-plugin-here-f9f9dbfd2c9f89329698f06ff873997baf397d62.zip |
Update patches applied in Tizen 4.0submit/tizen_3.0/20170811.022111accepted/tizen/3.0/wearable/20170813.224738accepted/tizen/3.0/tv/20170813.224742accepted/tizen/3.0/mobile/20170813.224749accepted/tizen/3.0/ivi/20170813.224801accepted/tizen/3.0/common/20170814.174837
Change-Id: Ib765ef27f7cbe930a3a51a462f502036c9d978cc
-rw-r--r-- | heremaps-uc-launcher/src/heremaps-uc-launcher.h | 4 | ||||
-rw-r--r-- | heremaps-uc/src/heremaps-uc.c | 5 | ||||
-rw-r--r-- | inc/here_manager.h | 2 | ||||
-rw-r--r-- | maps-plugin-here.changes | 5 | ||||
-rw-r--r-- | packaging/maps-plugin-here.spec | 2 | ||||
-rw-r--r-- | src/here_api.cpp | 2 | ||||
-rw-r--r-- | src/here_manager.cpp | 3 | ||||
-rw-r--r-- | src/here_multirevgeocode.cpp | 83 | ||||
-rw-r--r-- | src/here_revgeocode.cpp | 7 |
9 files changed, 64 insertions, 49 deletions
diff --git a/heremaps-uc-launcher/src/heremaps-uc-launcher.h b/heremaps-uc-launcher/src/heremaps-uc-launcher.h index 9749068..bebbe66 100644 --- a/heremaps-uc-launcher/src/heremaps-uc-launcher.h +++ b/heremaps-uc-launcher/src/heremaps-uc-launcher.h @@ -80,8 +80,8 @@ extern "C" { #define dgettext_noop(s) (s) #define N_(s) dgettext_noop(s) -#define LS_FUNC_ENTER LS_LOGD("(%s) ENTER", __FUNCTION__); -#define LS_FUNC_EXIT LS_LOGD("(%s) EXIT", __FUNCTION__); +#define LS_FUNC_ENTER LS_LOGD("(%s) ENTER", __FUNCTION__); +#define LS_FUNC_EXIT LS_LOGD("(%s) EXIT", __FUNCTION__); diff --git a/heremaps-uc/src/heremaps-uc.c b/heremaps-uc/src/heremaps-uc.c index 1265b98..63e2c07 100644 --- a/heremaps-uc/src/heremaps-uc.c +++ b/heremaps-uc/src/heremaps-uc.c @@ -350,7 +350,10 @@ static void _app_language_changed_cb(app_event_info_h event_info, void *user_dat LS_FUNC_ENTER char *locale = vconf_get_str(VCONFKEY_LANGSET); - if (locale) elm_language_set(locale); + if (locale) { + elm_language_set(locale); + free(locale); + } } int main(int argc, char *argv[]) diff --git a/inc/here_manager.h b/inc/here_manager.h index a7cc2ef..7a1738f 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/maps-plugin-here.changes b/maps-plugin-here.changes index d348b25..cec96f4 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-here_0.3.20 +[Date] 11 Aug 2017 +[Title] Update heremaps-engine to prevent crashes +[Developer] Seechan Kim <cbible.kim@samsung.com> + [Version] maps-plugin-here_0.3.19 [Date] 31 May 2017 [Title] Fix to set origin and destination when routing with waypoints. diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index 0b3faef..84836eb 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.19 +Version: 0.3.20 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/here_api.cpp b/src/here_api.cpp index 25ba368..e1127cd 100644 --- a/src/here_api.cpp +++ b/src/here_api.cpp @@ -678,7 +678,7 @@ int HerePluginCancelRequest(int nReqId) int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCbFunc) { HereView *vh = NULL, *ovh = NULL; - vh = new HereView(); + vh = new (std::nothrow) HereView(); if (!vh) return HERE_ERROR_OUT_OF_MEMORY; int error = maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh); maps_view_set_maps_plugin_view_handle(hView, vh); diff --git a/src/here_manager.cpp b/src/here_manager.cpp index e8e3b96..d6e5cf9 100644 --- a/src/here_manager.cpp +++ b/src/here_manager.cpp @@ -467,7 +467,8 @@ here_error_e HereManager::SetProxyAddress() MAPS_LOGD("Proxy = %s", (proxy_address ? proxy_address : "(null)")); Tizen::Maps::HereConfig::SetProxyAddress(proxy_address); } - g_free(proxy_address); + if (proxy_address) + free(proxy_address); return ConvertNetworkErrorCode(errorCode); } diff --git a/src/here_multirevgeocode.cpp b/src/here_multirevgeocode.cpp index 057fe05..76abc81 100644 --- a/src/here_multirevgeocode.cpp +++ b/src/here_multirevgeocode.cpp @@ -106,70 +106,73 @@ void HereMultiRevGeocode::OnMultiReverseReply(const MultiReverseReply& Reply) int nResults = Reply.GetNumResults(); Result* pResult; - maps_address_list_h address_list; + maps_address_list_h address_list = NULL; maps_address_list_create(&address_list); maps_address_h pAddr = NULL; String *additionalDataValue = NULL; 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()); - } - } - maps_address_list_append(address_list, pAddr); + 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; |