X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fopenvpn.c;h=9c717dd0a64a0f9511473c0c976f10c0f31bd639;hb=93d32dedac1cea88e5a9bd335a6413e040ed3566;hp=2d460d96a1a925943ee1af19737c71ea0ce0e031;hpb=424eab864a9f290d4a7638e0af03831429d48da8;p=collectd.git diff --git a/src/openvpn.c b/src/openvpn.c index 2d460d96..9c717dd0 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -263,15 +263,15 @@ static int multi1_read (char *name, FILE *fh) if (new_naming_schema) { - iostats_submit (fields[0], /* "Common Name" */ - NULL, /* unused when in multimode */ + iostats_submit (name, /* vpn instance */ + fields[0], /* "Common Name" */ atoll (fields[2]), /* "Bytes Received" */ atoll (fields[3])); /* "Bytes Sent" */ } else { - iostats_submit (name, /* vpn instance */ - fields[0], /* "Common Name" */ + iostats_submit (fields[0], /* "Common Name" */ + NULL, /* unused when in multimode */ atoll (fields[2]), /* "Bytes Received" */ atoll (fields[3])); /* "Bytes Sent" */ } @@ -568,7 +568,7 @@ static int openvpn_config (const char *key, const char *value) DEBUG ("openvpn plugin: status file \"%s\" added", temp->file); - } + } /* if (strcasecmp ("StatusFile", key) == 0) */ else if (strcasecmp ("Compression", key) == 0) { if (IS_TRUE (value)) @@ -578,7 +578,7 @@ static int openvpn_config (const char *key, const char *value) store_compression = 0; DEBUG ("openvpn plugin: no 'compression statistcs' collected"); } - } + } /* if (strcasecmp ("Compression", key) == 0) */ else if (strcasecmp ("ImprovedNamingSchema", key) == 0) { if (IS_TRUE (value)) @@ -590,7 +590,7 @@ static int openvpn_config (const char *key, const char *value) { new_naming_schema = 0; } - } + } /* if (strcasecmp ("ImprovedNamingSchema", key) == 0) */ else { return (-1); @@ -622,3 +622,5 @@ void module_register (void) plugin_register_read ("openvpn", openvpn_read); plugin_register_shutdown ("openvpn", openvpn_shutdown); } /* void module_register */ + +/* vim: set sw=2 ts=2 : */