X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fopenvpn.c;h=50670c5313f78148402770f5c6cdd749faec2705;hb=db8b1cda4841f45af22d149c6bfc575e79289f75;hp=1310c00ba45c14f6f8718d34b36b8bdd51254bba;hpb=8c5927c52f4eefebaad3a6ecadc253ee9007ebb5;p=collectd.git diff --git a/src/openvpn.c b/src/openvpn.c index 1310c00b..50670c53 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -519,6 +519,9 @@ static int openvpn_read (void) 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++) @@ -653,8 +656,8 @@ static int openvpn_config (const char *key, const char *value) 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); }