Merge branch 'collectd-4.5' into collectd-4.6
[collectd.git] / src / ping.c
index 09de77c..084e456 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/ping.c
- * Copyright (C) 2005,2006  Florian octo Forster
+ * Copyright (C) 2005-2007  Florian octo Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -185,13 +185,13 @@ static void ping_submit (char *host, double latency)
 
        vl.values = values;
        vl.values_len = 1;
-       vl.time = time (NULL);
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));
        sstrncpy (vl.plugin, "ping", sizeof (vl.plugin));
        sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance));
-       strncpy (vl.type_instance, host, sizeof (vl.type_instance));
+       sstrncpy (vl.type_instance, host, sizeof (vl.type_instance));
+       sstrncpy (vl.type, "ping", sizeof (vl.type));
 
-       plugin_dispatch_values ("ping", &vl);
+       plugin_dispatch_values (&vl);
 }
 
 static int ping_read (void)