1 diff --git a/src/openvpn.c b/src/openvpn.c
2 index d446e9957b68..ef5bf1078285 100644
5 @@ -70,6 +70,7 @@ static const char *config_keys[] =
7 static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
9 +static int version_detect (const char *filename);
12 * copy-n-pasted from common.c - changed delim to "," */
13 @@ -540,6 +541,11 @@ static int openvpn_read (void)
17 + // If the version was not detected yet, we try to guess again
18 + if (vpn_list[i]->version == 0) {
19 + vpn_list[i]->version = version_detect(vpn_list[i]->file);
22 switch (vpn_list[i]->version)
25 @@ -567,7 +573,7 @@ static int openvpn_read (void)
29 - return (read ? 0 : -1);
31 } /* int openvpn_read */
33 static int version_detect (const char *filename)
34 @@ -630,16 +636,6 @@ static int version_detect (const char *filename)
40 - /* This is only reached during configuration, so complaining to
41 - * the user is in order. */
42 - NOTICE ("openvpn plugin: %s: Unknown file format, please "
43 - "report this as bug. Make sure to include "
44 - "your status file, so the plugin can "
45 - "be adapted.", filename);
51 @@ -656,13 +652,6 @@ static int openvpn_config (const char *key, const char *value)
52 /* try to detect the status file format */
53 status_version = version_detect (value);
55 - if (status_version == 0)
57 - WARNING ("openvpn plugin: unable to detect status version, \
58 - discarding status file \"%s\".", value);
62 status_file = sstrdup (value);
63 if (status_file == NULL)