Sync with tizen_4.0 : warning, timeout limit 43/158143/2
authorchanywa <cbible.kim@samsung.com>
Mon, 30 Oct 2017 05:38:41 +0000 (14:38 +0900)
committerchanywa <cbible.kim@samsung.com>
Mon, 30 Oct 2017 05:41:27 +0000 (14:41 +0900)
Change-Id: I69f83415fc88bd619a0cff2058dbcc2223f9acc3

maps-plugin-mapzen.changes
packaging/maps-plugin-mapzen.spec
src/mapzen/mapzen_geocode.c
src/mapzen/mapzen_place.c
src/mapzen/mapzen_queue.c
src/mapzen/mapzen_route.cpp
src/mapzen/tangram_view.cpp

index f1989c336dd915e8da479b242d3bd43f0e70f961..34f9ab488a135c49699dda2f5922b21b7f390f37 100644 (file)
@@ -1,3 +1,18 @@
+[Version]   maps-plugin-mapzen_0.0.6
+[Date]      30 Oct 2017
+[Title]     Revise timeout limits for downloading map tiles.
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
+[Version]   maps-plugin-mapzen_0.0.5
+[Date]      10 Oct 2017
+[Title]     fix warning messages
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
+[Version]   maps-plugin-mapzen_0.0.3
+[Date]      18 May 2017
+[Title]     add mapzen plugin
+[Developer] Jongmun Woo <jongmun.woo@samsung.com>
+
 [Version]   maps-plugin-mapzen_0.0.2
 [Date]      08 Feb  2017
 [Title]     fix call EXPOST_API of other plugin
index 23c320f9af49511ce6fef63c5bed19b0dd90e500..bfc045d18228eac0bef9230d6cd96baec7c77f85 100644 (file)
@@ -1,9 +1,9 @@
 Name:       maps-plugin-mapzen
 Summary:    Tizen Mapzen Maps Plug-in Library
-Version:    0.0.3
+Version:    0.0.6
 Release:    1
 Group:      Location/Libraries
-License:    Apache-2.0
+License:    Apache-2.0 and MIT
 Source0:    %{name}-%{version}.tar.gz
 Source1:    deps.tar.gz
 ExclusiveArch:  %ix86 x86_64 %arm aarch64
@@ -23,6 +23,9 @@ BuildRequires: pkgconfig(elementary)
 Requires(post):  /sbin/ldconfig
 Requires(postun):  /sbin/ldconfig
 
+#
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
 
 %ifarch %arm
 %define ARCH arm
index 9d912dfd8686c9612dd57d7c3f5dc52777a5b99f..d2d4c5cbcabe7c6a2b1b68de389a66109ab1b2c9 100644 (file)
@@ -31,8 +31,8 @@
 
 int query_geocode_within_bounding_box(gchar *maps_key, char *address, coords_s top_left, coords_s bottom_right, int num_results, gpointer user_data)
 {
-       char url[1024];
-       char tmpStr[512];
+       char url[1024] = "";
+       char tmpStr[512] = "";
 
        if (maps_key != NULL)
                snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
@@ -59,8 +59,8 @@ int query_geocode_within_bounding_box(gchar *maps_key, char *address, coords_s t
 
 int query_geocode_within_circle(gchar *maps_key, char *address, coords_s center, double radius, int num_results, gpointer user_data)
 {
-       char url[1024];
-       char tmpStr[512];
+       char url[1024] = "";
+       char tmpStr[512] = "";
 
        if (maps_key != NULL)
                snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
@@ -89,8 +89,8 @@ int query_geocode_within_circle(gchar *maps_key, char *address, coords_s center,
 int query_geocode(gchar *maps_key, char *address, int num_results, gpointer user_data)
 {
        MAP_DEBUG("geocode address : %s", address);
-       char url[1024];
-       char tmpStr[512];
+       char url[1024] = "";
+       char tmpStr[512] = "";
 
        if (maps_key != NULL)
                snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
index 4c6da640d44f675a9670f5facf1265a7842b8f01..8282ab9f1c12f85a2c6e3c8d901bbff41004dc0a 100644 (file)
@@ -33,8 +33,8 @@
 
 int query_places(gchar *maps_key, gchar *search_str, gchar *categories, mapzen_boundary_s *boundary, int num_res, gpointer user_data, mapzen_req_type type)
 {
-       char url[1024];
-       char tmpStr[512];
+       char url[1024] = "";
+       char tmpStr[512] = "";
 
        if (search_str != NULL || boundary->type == MAPZEN_BOUNDARY_RECT) {
                if (maps_key != NULL)
@@ -99,13 +99,14 @@ int query_places(gchar *maps_key, gchar *search_str, gchar *categories, mapzen_b
 
 int query_place_details(gchar *maps_key, gchar *ids, gpointer user_data)
 {
-       char url[1024];
-       char tmpStr[512];
+       char url[1024] = "";
+       char tmpStr[512] = "";
 
        if (maps_key != NULL)
                snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, maps_key);
-       else snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, "null");
-               STRCPY(url, tmpStr);
+       else
+               snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, "null");
+       STRCPY(url, tmpStr);
 
        if (ids != NULL) {
                char *encoded = curl_escape(ids, 0);
index 87c1f08879e2f241d6b112d723a7a8eb32014c4e..2dd5d307b8d712800f4397c50e0cc5674933ab87 100644 (file)
@@ -70,6 +70,8 @@ int add_to_geocode_list(mapzen_geocode_req_s *req_details, mapzen_geocode_cb cal
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
        }
 
@@ -102,6 +104,8 @@ int add_to_revgeocode_list(mapzen_revgeocode_req_s *req_details, mapzen_reverse_
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
        }
 
@@ -134,6 +138,8 @@ int add_to_place_list(mapzen_search_req_s *req_details, mapzen_place_search_cb c
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
        }
 
@@ -166,6 +172,8 @@ int add_to_place_details_list(mapzen_get_details_req_s *req_details, mapzen_get_
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
        }
 
@@ -202,6 +210,8 @@ int add_to_places_list(mapzen_search_req_s *req_details, mapzen_place_list_searc
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
        }
 
@@ -238,8 +248,9 @@ int add_to_route_list(mapzen_route_req_s *req_details, mapzen_route_cb callback,
                        else
                                requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
                        pthread_mutex_unlock(&__requestLock);
+               } else {
+                       g_free(req);
                }
-
        }
 
        return MAPZEN_ERROR_NONE;
@@ -489,7 +500,7 @@ mapzen_request_s *get_next_request()
        return NULL;
 }
 
-static gboolean __timeout_cb(gpointer data)
+static gboolean __timeout_cb(gpointer user_data)
 {
        MAP_DEBUG("timeout_cb");
        __response_timer_running = true;
index 361a39fec74f4452494c36a460697a2d9e154747..6e7337424dde08570821b5a2600f9fae72930189 100644 (file)
@@ -45,7 +45,7 @@ extern "C" {
 
 std::string url_encode(const std::string& unencoded) {
    char* encoded = curl_escape(unencoded.c_str(), static_cast<int>(unencoded.size()));
-   MAP_DEBUG("route json after url encoding: " + *encoded);
+   MAP_DEBUG("route json after url encoding: %s", (encoded ? encoded : "(null)"));
    std::string encoded_str(encoded);
    curl_free(encoded);
    return encoded_str;
index 45b8db5caa7148f30630c4f92db561b43d660be0..d5fc7284257d61235e2699fd1bb4f0083be7a820 100644 (file)
@@ -113,6 +113,9 @@ mapzen_error_e TangramView::create(maps_view_h view, maps_plugin_map_view_ready_
                free(proxyAddress);
        }
 
+       urlOptions.connectionTimeoutMs = 0;
+       urlOptions.requestTimeoutMs = 120000;
+
        m_platform = std::make_shared<Tangram::TizenPlatform>(urlOptions);
 
        m_uiThreadId = syscall(SYS_gettid);
@@ -648,7 +651,7 @@ mapzen_error_e TangramView::updateMarker(maps_view_object_h object, Tangram::Mar
        int error = MAPS_ERROR_NONE;
        unsigned char *imgData = nullptr;
 
-       const char* styleFormat = "{ style: 'sdk-point-overlay', color: white, size: [%dpx, %dpx], collide: false, anchor: %s, transition: { [show, hide]: { time: 0s } } }";
+       const char styleFormat[] = "{ style: 'sdk-point-overlay', color: white, size: [%dpx, %dpx], collide: false, anchor: %s, transition: { [show, hide]: { time: 0s } } }";
 
        static std::string anchor;
 
@@ -733,7 +736,7 @@ mapzen_error_e TangramView::updatePolyline(maps_view_object_h object, Tangram::M
        unsigned char r = 0, g = 0, b = 0, a = 0;
        int width = 0;
 
-       const char* styleFormat = "{ style: 'ux-route-line-overlay', color: [%d, %d, %d, %d], width: %dpx, order: 500 }";
+       const char styleFormat[] = "{ style: 'ux-route-line-overlay', color: [%d, %d, %d, %d], width: %dpx, order: 500 }";
 
        do {
                error = maps_view_object_polyline_get_color(object, &r, &g, &b, &a);
@@ -763,7 +766,7 @@ mapzen_error_e TangramView::updatePolygon(maps_view_object_h object, Tangram::Ma
        int error = MAPS_ERROR_NONE;
        Tangram::Coordinates coords = {};
        unsigned char r = 0, g = 0, b = 0, a = 0;
-       const char* styleFormat = "{ style: 'polygons', color: [%d, %d, %d, %d] }";
+       const char styleFormat[] = "{ style: 'polygons', color: [%d, %d, %d, %d] }";
 
        do {
                error = maps_view_object_polygon_get_fill_color(object, &r, &g, &b, &a);