X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fopenvpn.c;h=50670c5313f78148402770f5c6cdd749faec2705;hb=c76419c0cf983f1ecd3d36aa236cc4e3f9cff733;hp=1310c00ba45c14f6f8718d34b36b8bdd51254bba;hpb=92860d61218a3da1e9b74a2fad37e9df88df8ce8;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); }