Merge pull request #3276 from chrismcn/upstream_turbostat
[collectd.git] / src / sysevent.c
index 83924c8..aab5141 100644 (file)
 
 #include "collectd.h"
 
-#include "common.h"
 #include "plugin.h"
+#include "utils/common/common.h"
+#include "utils/ignorelist/ignorelist.h"
 #include "utils_complain.h"
-#include "utils_ignorelist.h"
 
 #include <errno.h>
 #include <netdb.h>
@@ -472,7 +472,7 @@ static int read_socket() {
     } else {
       DEBUG("sysevent plugin: writing %s", buffer);
 
-      strncpy(ring.buffer[ring.head], buffer, sizeof(buffer));
+      sstrncpy(ring.buffer[ring.head], buffer, sizeof(buffer));
       ring.timestamp[ring.head] = cdtime();
       ring.head = next;
     }
@@ -1085,7 +1085,7 @@ static int sysevent_read(void) /* {{{ */
           "Restarting it.",
           sysevent_socket_thread_error);
 
-    stop_threads(0);
+    stop_threads();
 
     start_threads();
 
@@ -1101,7 +1101,7 @@ static int sysevent_shutdown(void) /* {{{ */
 {
   DEBUG("sysevent plugin: Shutting down thread.");
 
-  int status = stop_threads(1);
+  int status = stop_threads();
   int status2 = 0;
 
   if (sock != -1) {