projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contrib/docker: add LD_PRELOAD wrapper to fopen/open/opendir syscalls
[collectd.git]
/
src
/
chrony.c
diff --git
a/src/chrony.c
b/src/chrony.c
index
0485036
..
77ba8cc
100644
(file)
--- a/
src/chrony.c
+++ b/
src/chrony.c
@@
-452,8
+452,8
@@
chrony_connect(void)
if (chrony_set_timeout())
{
if (chrony_set_timeout())
{
- ERROR(PLUGIN_NAME ": Error setting timeout to %lds. Errno = %d",
- g_chrony_timeout, errno);
+ ERROR(PLUGIN_NAME ": Error setting timeout to %l
l
ds. Errno = %d",
+
(long long)
g_chrony_timeout, errno);
return CHRONY_RC_FAIL;
}
return CHRONY_RC_OK;
return CHRONY_RC_FAIL;
}
return CHRONY_RC_OK;
@@
-677,18
+677,12
@@
ntohf(tFloat p_float)
static void
chrony_push_data(const char *p_type, const char *p_type_inst, double p_value)
{
static void
chrony_push_data(const char *p_type, const char *p_type_inst, double p_value)
{
- value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
value_list_t vl = VALUE_LIST_INIT;
- values[0].gauge = p_value; /* TODO: Check type??? (counter, gauge, derive, absolute) */
-
- vl.values = values;
+ vl.values = &(value_t) { .gauge = p_value };
vl.values_len = 1;
/* XXX: Shall g_chrony_host/g_chrony_port be reflected in the plugin's output? */
vl.values_len = 1;
/* XXX: Shall g_chrony_host/g_chrony_port be reflected in the plugin's output? */
- /* hostname_g is set in daemon/collectd.c (from config, via gethostname or by resolving localhost) */
- /* defined as: char hostname_g[DATA_MAX_NAME_LEN]; (never NULL) */
- sstrncpy(vl.host, hostname_g, sizeof(vl.host));
sstrncpy(vl.plugin, PLUGIN_NAME_SHORT, sizeof(vl.plugin));
if (g_chrony_plugin_instance != NULL)
{
sstrncpy(vl.plugin, PLUGIN_NAME_SHORT, sizeof(vl.plugin));
if (g_chrony_plugin_instance != NULL)
{