summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 893f08e)
raw | patch | inline | side by side (parent: 893f08e)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Sat, 29 Oct 2016 12:25:15 +0000 (18:25 +0600) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Sat, 29 Oct 2016 13:08:28 +0000 (19:08 +0600) |
When plugin loaded without configuration, it starts to spam logs with message
'read-function of plugin `openvpn' failed'.
Issue: #1932
'read-function of plugin `openvpn' failed'.
Issue: #1932
src/openvpn.c | patch | blob | history |
diff --git a/src/openvpn.c b/src/openvpn.c
index 00ae736ad4b01c70555f509c0b3580afb8fa8329..be9a4dc863e383ca006660faeb3501c7020436b1 100644 (file)
--- a/src/openvpn.c
+++ b/src/openvpn.c
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++)
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);
}