projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt plugin: Added timeout to event_loop thread
[collectd.git]
/
src
/
collectd-tg.c
diff --git
a/src/collectd-tg.c
b/src/collectd-tg.c
index
9357ce3
..
92d1f01
100644
(file)
--- a/
src/collectd-tg.c
+++ b/
src/collectd-tg.c
@@
-43,7
+43,7
@@
#include <time.h>
#include <unistd.h>
#include <time.h>
#include <unistd.h>
-#include "utils
_
heap.h"
+#include "utils
/heap/
heap.h"
#include "collectd/client.h"
#include "collectd/network.h"
#include "collectd/client.h"
#include "collectd/network.h"
@@
-95,7
+95,7
@@
__attribute__((noreturn)) static void exit_usage(int exit_status) /* {{{ */
exit(exit_status);
} /* }}} void exit_usage */
exit(exit_status);
} /* }}} void exit_usage */
-static void signal_handler(int signal) /* {{{ */
+static void signal_handler(int
__attribute__((unused))
signal) /* {{{ */
{
loop = false;
} /* }}} void signal_handler */
{
loop = false;
} /* }}} void signal_handler */
@@
-105,7
+105,7
@@
static double dtime(void) /* {{{ */
{
struct timespec ts = {0};
{
struct timespec ts = {0};
- if (clock_gettime(CLOCK_
MONOTONIC
, &ts) != 0)
+ if (clock_gettime(CLOCK_
REALTIME
, &ts) != 0)
perror("clock_gettime");
return (double)ts.tv_sec + (double)ts.tv_nsec / 1e9;
perror("clock_gettime");
return (double)ts.tv_sec + (double)ts.tv_nsec / 1e9;
@@
-196,7
+196,7
@@
static lcc_value_list_t *create_value_list(void) /* {{{ */
strncpy(vl->identifier.type,
(vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive",
sizeof(vl->identifier.type));
strncpy(vl->identifier.type,
(vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive",
sizeof(vl->identifier.type));
- vl->identifier.type[sizeof(vl->identifier.type) - 1] =
0
;
+ vl->identifier.type[sizeof(vl->identifier.type) - 1] =
'\0'
;
snprintf(vl->identifier.type_instance, sizeof(vl->identifier.type_instance),
"ti%li", random());
snprintf(vl->identifier.type_instance, sizeof(vl->identifier.type_instance),
"ti%li", random());