projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.8'
[collectd.git]
/
src
/
ntpd.c
diff --git
a/src/ntpd.c
b/src/ntpd.c
index
d0cd94c
..
baa1988
100644
(file)
--- a/
src/ntpd.c
+++ b/
src/ntpd.c
@@
-56,7
+56,7
@@
static const char *config_keys[] = {"Host", "Port", "ReverseLookups",
"IncludeUnitID"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
"IncludeUnitID"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static bool do_reverse_lookups =
1
;
+static bool do_reverse_lookups =
true
;
/* This option only exists for backward compatibility. If it is false and two
* ntpd peers use the same refclock driver, the plugin will try to write
/* This option only exists for backward compatibility. If it is false and two
* ntpd peers use the same refclock driver, the plugin will try to write
@@
-66,7
+66,7
@@
static bool include_unit_id;
#define NTPD_DEFAULT_HOST "localhost"
#define NTPD_DEFAULT_PORT "123"
static int sock_descr = -1;
#define NTPD_DEFAULT_HOST "localhost"
#define NTPD_DEFAULT_PORT "123"
static int sock_descr = -1;
-static char *ntpd_host
= NULL
;
+static char *ntpd_host;
static char ntpd_port[16];
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
static char ntpd_port[16];
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@
-272,14
+272,14
@@
static int ntpd_config(const char *key, const char *value) {
sstrncpy(ntpd_port, value, sizeof(ntpd_port));
} else if (strcasecmp(key, "ReverseLookups") == 0) {
if (IS_TRUE(value))
sstrncpy(ntpd_port, value, sizeof(ntpd_port));
} else if (strcasecmp(key, "ReverseLookups") == 0) {
if (IS_TRUE(value))
- do_reverse_lookups =
1
;
+ do_reverse_lookups =
true
;
else
else
- do_reverse_lookups =
0
;
+ do_reverse_lookups =
false
;
} else if (strcasecmp(key, "IncludeUnitID") == 0) {
if (IS_TRUE(value))
} else if (strcasecmp(key, "IncludeUnitID") == 0) {
if (IS_TRUE(value))
- include_unit_id =
1
;
+ include_unit_id =
true
;
else
else
- include_unit_id =
0
;
+ include_unit_id =
false
;
} else {
return -1;
}
} else {
return -1;
}