From: Florian Forster Date: Mon, 20 Nov 2017 10:21:41 +0000 (+0100) Subject: gps plugin: Properly unlock mutex after waiting. X-Git-Tag: collectd-5.8.1~45^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9580905a83368eb50b4fc85e4bc8f8474b408f64;p=thirdparty%2Fcollectd.git gps plugin: Properly unlock mutex after waiting. How did this ever work?! CID: 158522 --- diff --git a/src/gps.c b/src/gps.c index 141c03216..686710ba8 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; }