sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
sstrncpy (vl.type, "users", sizeof (vl.type));
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "openvpn", sizeof (vl.plugin));
sstrncpy (vl.type, "users", sizeof (vl.type));
-/* dispatches stats about traffic (TCP or UDP) generated by the tunnel per single endpoint */
-static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx)
+/* dispatches stats about traffic (TCP or UDP) generated by the tunnel
+ * per single endpoint */
+static void iostats_submit (const char *pinst, const char *tinst,
+ derive_t rx, derive_t tx)
-
- values[0].derive = uncompressed;
- values[1].derive = compressed;
+ value_t values[] = {
+ { .derive = uncompressed },
+ { .derive = compressed },
+ };
if (strcasecmp ("StatusFile", key) == 0)
{
char *status_file, *status_name, *filename;
if (strcasecmp ("StatusFile", key) == 0)
{
char *status_file, *status_name, *filename;
{
char errbuf[1024];
ERROR ("openvpn plugin: realloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
{
char errbuf[1024];
ERROR ("openvpn plugin: realloc failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));