X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgps.c;h=686710ba85c91c6a5f105ab7bb917560270c0b36;hb=ca89ee257db233a0512c73b6d8353b1aa86e3e8a;hp=a4b3e2e73e0d00bca199f63b34d694cdf50ad5d1;hpb=edcf39cc377d2de0744412209de4eeb50ca7ed5f;p=collectd.git diff --git a/src/gps.c b/src/gps.c index a4b3e2e7..686710ba 100644 --- a/src/gps.c +++ b/src/gps.c @@ -26,10 +26,10 @@ * Marc Fournier **/ +#include "collectd.h" #include "common.h" #include "plugin.h" #include "utils_time.h" -#include "collectd.h" #define CGPS_TRUE 1 #define CGPS_FALSE 0 @@ -80,7 +80,7 @@ static int cgps_thread_pause(cdtime_t pTime) { int ret = !cgps_thread_shutdown; - pthread_mutex_lock(&cgps_thread_lock); + pthread_mutex_unlock(&cgps_thread_lock); return ret; } @@ -307,7 +307,6 @@ static int cgps_shutdown(void) { free(res); // Clean mutex: - pthread_mutex_unlock(&cgps_thread_lock); pthread_mutex_destroy(&cgps_thread_lock); pthread_mutex_unlock(&cgps_data_lock); pthread_mutex_destroy(&cgps_data_lock);