projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/utils_latency.[ch]: get_rate(): Make lower bound exclusive.
[collectd.git]
/
src
/
openvpn.c
diff --git
a/src/openvpn.c
b/src/openvpn.c
index
81ffa89
..
50670c5
100644
(file)
--- a/
src/openvpn.c
+++ b/
src/openvpn.c
@@
-103,7
+103,6
@@
static void numusers_submit (const char *pinst, const char *tinst,
vl.values = &(value_t) { .gauge = value };
vl.values_len = 1;
vl.values = &(value_t) { .gauge = value };
vl.values_len = 1;
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
sstrncpy (vl.type, "users", sizeof (vl.type));
if (pinst != NULL)
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
sstrncpy (vl.type, "users", sizeof (vl.type));
if (pinst != NULL)
@@
-133,7
+132,6
@@
static void iostats_submit (const char *pinst, const char *tinst,
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
if (pinst != NULL)
sstrncpy (vl.plugin_instance, pinst,
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
if (pinst != NULL)
sstrncpy (vl.plugin_instance, pinst,
@@
-157,7
+155,6
@@
static void compression_submit (const char *pinst, const char *tinst,
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
if (pinst != NULL)
sstrncpy (vl.plugin_instance, pinst,
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
if (pinst != NULL)
sstrncpy (vl.plugin_instance, pinst,
@@
-522,6
+519,9
@@
static int openvpn_read (void)
int read;
read = 0;
int read;
read = 0;
+
+ if (vpn_num == 0)
+ return (0);
/* call the right read function for every status entry in the list */
for (int i = 0; i < vpn_num; i++)
/* call the right read function for every status entry in the list */
for (int i = 0; i < vpn_num; i++)
@@
-656,8
+656,8
@@
static int openvpn_config (const char *key, const char *value)
if (status_version == 0)
{
if (status_version == 0)
{
- WARNING ("openvpn plugin: unable to detect status version,
\
- discarding status file \"%s\".", value);
+ WARNING ("openvpn plugin: unable to detect status version,
"
+
"
discarding status file \"%s\".", value);
return (1);
}
return (1);
}