From e9287a320d855bf8412f9fa2df90aafd4d0539b6 Mon Sep 17 00:00:00 2001 From: chanywa Date: Fri, 23 Sep 2016 13:11:04 +0900 Subject: [PATCH] fixed Svace issues reported by Tizen Commercialization Team Change-Id: If7b7ab8e7f258e3fb63818c7eab14f01bdca3387 Signed-off-by: chanywa --- inc/here_manager.h | 2 +- inc/here_view_objects.h | 2 +- maps-plugin-here.changes | 5 +++++ packaging/maps-plugin-here.spec | 2 +- src/here_api.cpp | 17 ++++++++++------- src/here_multirevgeocode.cpp | 2 +- src/here_place.cpp | 1 + src/here_view.cpp | 3 ++- src/here_view_objects.cpp | 2 ++ 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/inc/here_manager.h b/inc/here_manager.h index 0025e20..a7cc2ef 100644 --- a/inc/here_manager.h +++ b/inc/here_manager.h @@ -58,7 +58,7 @@ public: *This is the default destructor for Geocoder. */ - virtual ~HereManager(); + ~HereManager(); enum HereSvcType { HERE_SVC_GEOCODE, diff --git a/inc/here_view_objects.h b/inc/here_view_objects.h index b2c29dc..4e56e1c 100644 --- a/inc/here_view_objects.h +++ b/inc/here_view_objects.h @@ -49,7 +49,7 @@ class HereViewObjects { public: HereViewObjects(); - virtual ~HereViewObjects(); + ~HereViewObjects(); void set(GeoTiledMap *map, Evas *evas); // to remove // void update(UpdatedObjects objects); diff --git a/maps-plugin-here.changes b/maps-plugin-here.changes index eaef268..cfa3c83 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-here_0.3.8 +[Date] 23 Sep 2016 +[Title] Fixed Svace issues +[Developer] Seechan Kim + [Version] maps-plugin-here_0.3.7 [Date] 13 Sep 2016 [Title] Fixed to allow setting distance to 0 when searching places diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index ede4f99..2fa38bb 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.7 +Version: 0.3.8 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/here_api.cpp b/src/here_api.cpp index 7087592..b3fbd9a 100644 --- a/src/here_api.cpp +++ b/src/here_api.cpp @@ -680,9 +680,9 @@ int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCb HereView *vh = NULL, *ovh = NULL; vh = new HereView(); if (!vh) return HERE_ERROR_OUT_OF_MEMORY; - maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh); + int error = maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh); maps_view_set_maps_plugin_view_handle(hView, vh); - if (ovh) + if (error == HERE_ERROR_NONE && ovh) delete ovh; return vh->init(hView, pCbFunc); } @@ -847,17 +847,20 @@ static void _heremaps_consent_changed_cb(keynode_t *node EINA_UNUSED, void *user int HerePluginCheckUC(const char *provider, maps_service_request_user_consent_cb pCbFunc, void *user_data) { - heremaps_uc_cb_data *uc_data = (heremaps_uc_cb_data *)g_malloc0(sizeof(heremaps_uc_cb_data)); - uc_data->provider = provider; - uc_data->pCbFunc = pCbFunc; - uc_data->user_data = user_data; - int ret = HEREMAPS_UC_DBUS_ERROR_NONE; bool agreed = heremaps_check_agreement(); if (agreed != TRUE) { + heremaps_uc_cb_data *uc_data = (heremaps_uc_cb_data *)g_malloc0(sizeof(heremaps_uc_cb_data)); + if (!uc_data) + return HERE_ERROR_OUT_OF_MEMORY; + uc_data->provider = provider; + uc_data->pCbFunc = pCbFunc; + uc_data->user_data = user_data; + if (vconf_notify_key_changed(VCONFKEY_LOCATION_HEREMAPS_CONSENT, _heremaps_consent_changed_cb, uc_data) < 0) { MAPS_LOGD("Unable to register a vconf changed cb to VCONFKEY_LOCATION_HEREMAPS_CONSENT"); + g_free(uc_data); return HERE_ERROR_SERVICE_NOT_AVAILABLE; } MAPS_LOGD("heremaps_uc_dbus_launch_receiver is called"); diff --git a/src/here_multirevgeocode.cpp b/src/here_multirevgeocode.cpp index 2bc9dda..057fe05 100644 --- a/src/here_multirevgeocode.cpp +++ b/src/here_multirevgeocode.cpp @@ -58,7 +58,7 @@ static bool geocoder_coordinates_cb(int index, maps_coordinates_h coordinates, v hereCoord = GeoCoordinates(dLatitude, dLongitude); if (!HereUtils::IsValid(hereCoord)) - return HERE_ERROR_INVALID_PARAMETER; + return false; GeoCoordinateList *pList =(GeoCoordinateList *) user_data; pList->push_back(hereCoord); diff --git a/src/here_place.cpp b/src/here_place.cpp index 2bca429..f9ef2b4 100644 --- a/src/here_place.cpp +++ b/src/here_place.cpp @@ -555,6 +555,7 @@ void HerePlace::OnPlaceDetailsReply(const PlaceDetailsReply &Reply) /* Finding maps_place_h which is already pending since DiscoverReply */ PlaceList::iterator it; for (it = m_PlaceList.begin(); it != m_PlaceList.end(); it++) { + placeId = NULL; if (maps_place_get_id(*it, &placeId) == MAPS_ERROR_NONE) { placeIdLen = strlen(placeId); if(!herePlace.GetPlaceId().compare(0, placeIdLen, placeId)) { diff --git a/src/here_view.cpp b/src/here_view.cpp index acf284b..33c7ee7 100644 --- a/src/here_view.cpp +++ b/src/here_view.cpp @@ -206,9 +206,10 @@ here_error_e HereView::close(maps_view_h view) if (__sfc && __ctx) evas_gl_make_current(__gl, __sfc, __ctx); - if (__sfc) + if (__sfc) { evas_object_image_native_surface_set(__img, NULL); evas_gl_surface_destroy(__gl, __sfc); + } if (__ctx) evas_gl_context_destroy(__gl, __ctx); diff --git a/src/here_view_objects.cpp b/src/here_view_objects.cpp index b41eace..9be5153 100644 --- a/src/here_view_objects.cpp +++ b/src/here_view_objects.cpp @@ -29,6 +29,8 @@ HERE_PLUGIN_BEGIN_NAMESPACE HereViewObjects::HereViewObjects() { + __map = NULL; + __evas = NULL; pthread_mutex_init(&__mutex, NULL); } -- 2.34.1