Ensure internal hash table is empty before destroying maps handle 60/142760/5 accepted/tizen/unified/20170810.171754 submit/tizen/20170809.064422
authorchanywa <cbible.kim@samsung.com>
Mon, 7 Aug 2017 07:42:50 +0000 (16:42 +0900)
committerSeechan Kim <cbible.kim@samsung.com>
Wed, 9 Aug 2017 05:20:28 +0000 (05:20 +0000)
Change-Id: I473435e729dd94f8a1e87839fdc64bef71adcdb4

capi-maps-service.changes
packaging/capi-maps-service.spec
src/api/maps_address.cpp
src/api/maps_coordinates.cpp
src/plugin/module.cpp

index cd8fb7e..b098bd9 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   capi-maps-service_0.6.16
+[Date]      07 oct 2017
+[Title]     Ensure internal hash table is empty before destroying maps handle.
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   capi-maps-service_0.6.15
 [Date]      26 Jul 2017
 [Title]     Add check routine for symbolic link file
index 8c64c23..e4d42c2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-maps-service
 Summary:    Tizen Maps Service API
-Version:    0.6.15
+Version:    0.6.16
 Release:    1
 Group:      Location/API
 License:    Apache-2.0
index af59431..47e7938 100644 (file)
@@ -519,8 +519,6 @@ EXPORT_API int maps_address_list_destroy(maps_address_list_h address_list)
                return MAPS_ERROR_INVALID_PARAMETER;
 
        GList *list = (GList *) address_list;
-       MAPS_LOGD("address_list:%p, length = %d", list, g_list_length(list));
-
        g_list_free_full(list, (GDestroyNotify) maps_address_destroy);
        address_list = NULL;
 
index c8d1eed..18d147e 100644 (file)
@@ -197,18 +197,6 @@ EXPORT_API int maps_coordinates_list_create(maps_coordinates_list_h *coordinates
        return MAPS_ERROR_NONE;
 }
 
-static void _free_coordinates(gpointer data)
-{
-       if (!data) return;
-
-       int ret = 0;
-       maps_coordinates_s *coordinates = (maps_coordinates_s *) data;
-       ret = maps_coordinates_destroy(coordinates);
-       if (ret) {
-               MAPS_LOGI("Failed to maps_coordinates_destroy!!!"); //LCOV_EXCL_LINE
-       }
-}
-
 EXPORT_API int maps_coordinates_list_destroy(maps_coordinates_list_h coordinates_list)
 {
        if (!maps_condition_check_maps_feature())
@@ -217,8 +205,7 @@ EXPORT_API int maps_coordinates_list_destroy(maps_coordinates_list_h coordinates
                return MAPS_ERROR_INVALID_PARAMETER;
 
        GList *list = (GList *) coordinates_list;
-
-       g_list_free_full(list, (GDestroyNotify) _free_coordinates);
+       g_list_free_full(list, (GDestroyNotify) maps_coordinates_destroy);
        coordinates_list = NULL;
 
        return MAPS_ERROR_NONE;
index 1f5c846..d2118e4 100644 (file)
@@ -341,6 +341,7 @@ void plugin::binary_extractor::shutdown(maps_plugin_h plugin_h)
 
        /* 3. Destroy the map of pending requests */
        if (plugin->pending_request_maps) {
+               g_hash_table_remove_all(plugin->pending_request_maps);
                g_hash_table_unref(plugin->pending_request_maps);
 
                /* Clear the mutex for the map of pending requests */