When plugin loaded without configuration, it starts to spam logs with message
'read-function of plugin `openvpn' failed'.
Issue: #1932
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);
}