X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=4f0a0ba945459c9dab443412d955e60158ebfde8;hb=a1dd93a24121e1b11406fdeb94954900bc9774aa;hp=1cf707797f1057b4fb6124c763a46e057b2753ee;hpb=8f2cabfa3fa192a664c47029a321ae87963815ed;p=collectd.git diff --git a/src/swap.c b/src/swap.c index 1cf70779..4f0a0ba9 100644 --- a/src/swap.c +++ b/src/swap.c @@ -36,6 +36,10 @@ # include #endif +#if HAVE_STATGRAB_H +# include +#endif + #undef MAX #define MAX(x,y) ((x) > (y) ? (x) : (y)) @@ -122,9 +126,10 @@ static void swap_submit (const char *type_instance, double value) vl.time = time (NULL); strcpy (vl.host, hostname_g); strcpy (vl.plugin, "swap"); - strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)); + strcpy (vl.type, "swap"); + sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)); - plugin_dispatch_values ("swap", &vl); + plugin_dispatch_values (&vl); } /* void swap_submit */ static int swap_read (void)