Revert "Fix crashes when terminating threads" 31/162231/1
authorchanywa <cbible.kim@samsung.com>
Wed, 29 Nov 2017 22:54:42 +0000 (07:54 +0900)
committerchanywa <cbible.kim@samsung.com>
Wed, 29 Nov 2017 22:56:04 +0000 (07:56 +0900)
This reverts commit e6905cabf5c739491937edf7fb382991057d2dbd.

Change-Id: I9f90c90c29f78ae74326132224de21151137c7fc
Signed-off-by: chanywa <cbible.kim@samsung.com>
maps-plugin-mapzen.changes
packaging/maps-plugin-mapzen.spec
src/mapzen/mapzen_restcurl.c

index d1532af..585f2d2 100644 (file)
@@ -1,8 +1,3 @@
-[Version]   maps-plugin-mapzen_0.0.7
-[Date]      24 Nov 2017
-[Title]     Fix crashes when terminating threads
-[Developer] Seechan Kim <cbible.kim@samsung.com>
-
 [Version]   maps-plugin-mapzen_0.0.6
 [Date]      30 Oct 2017
 [Title]     Revise timeout limits for downloading map tiles.
index bae28a1..bfc045d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-mapzen
 Summary:    Tizen Mapzen Maps Plug-in Library
-Version:    0.0.7
+Version:    0.0.6
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and MIT
index b025a92..913a717 100644 (file)
@@ -537,17 +537,11 @@ static void *__curl_thread_handler(void *user_data)
                        }
                }
 
-
-               struct timeval  now;
-               struct timespec timeout;
-               gettimeofday(&now, NULL);
-               timeout.tv_sec = now.tv_sec + 3;
-               timeout.tv_nsec = now.tv_usec * 1000;
-
-               pthread_mutex_lock(&__curl_deliver_mutex);
-               if (__thread_running_for_curlmulti && !__MultiCurlArgsRemain)
-                       pthread_cond_timedwait(&__curl_delivered_cond, &__curl_deliver_mutex, &timeout);
-               pthread_mutex_unlock(&__curl_deliver_mutex);
+               if (__thread_running_for_curlmulti && !__MultiCurlArgsRemain) {
+                       pthread_mutex_lock(&__curl_deliver_mutex);
+                       pthread_cond_wait(&__curl_delivered_cond, &__curl_deliver_mutex);
+                       pthread_mutex_unlock(&__curl_deliver_mutex);
+               }
        }
 
 #else
@@ -610,7 +604,7 @@ int deinit_curl()
        pthread_cond_signal(&__curl_delivered_cond);
        pthread_mutex_unlock(&__curl_deliver_mutex);
 
-       //pthread_cancel(__CurlThread);
+       pthread_cancel(__CurlThread);
 
        pthread_join(__CurlThread, NULL);