Code

gmond plugin: Fix handling of COUNTER and ABSOLUTE data sources.
authorFlorian Forster <octo@collectd.org>
Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200)
committerFlorian Forster <octo@collectd.org>
Thu, 18 Jun 2015 07:25:41 +0000 (09:25 +0200)
src/gmond.c

index 28be0920ccf51cd43731f9fd2e4549e780fe4ea5..ff4936d1d9767f810c8de2281568e8aceaa0ae0d 100644 (file)
@@ -660,7 +660,7 @@ static int mc_handle_value_msg (Ganglia_value_msg *msg) /* {{{ */
     if ((map->ds_type == DS_TYPE_COUNTER)
         || (map->ds_type == DS_TYPE_ABSOLUTE))
       val_copy = value_counter;
-    if (map->ds_type == DS_TYPE_GAUGE)
+    else if (map->ds_type == DS_TYPE_GAUGE)
       val_copy = value_gauge;
     else if (map->ds_type == DS_TYPE_DERIVE)
       val_copy = value_derive;