X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fgps.c;h=1d32d04926170a8fc654d4f20222403976776a92;hp=210c29344c18e263e4ae1ddc4138f96b7d76da72;hb=1159cb5d383c55a80a0db100b8f7aadcf44740a5;hpb=217ec252adf547f2dd048489e2498bc31e8f70db diff --git a/src/gps.c b/src/gps.c index 210c2934..1d32d049 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);