Merge branch 'collectd-5.5'
authorFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 18:08:24 +0000 (20:08 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 18:08:24 +0000 (20:08 +0200)
src/barometer.c
src/write_sensu.c

index ee200b6..a6d9835 100644 (file)
@@ -255,7 +255,7 @@ static averaging_t temperature_averaging = { NULL, 0, 0L, 0 };
  */
 static int averaging_create(averaging_t *avg, int size)
 {
-    avg->ring_buffer = calloc ((size_t) size, sizeof (*avg));
+    avg->ring_buffer = calloc ((size_t) size, sizeof (*avg->ring_buffer));
     if (avg->ring_buffer == NULL)
     {
         ERROR ("barometer: averaging_create - ring buffer allocation of size %d failed",
index 268d9e4..f7803e8 100644 (file)
@@ -1172,7 +1172,7 @@ static int sensu_config(oconfig_item_t *ci) /* {{{ */
                                continue;
                        }
                        if (child->values[0].type != OCONFIG_TYPE_STRING ||
-                           child->values[1].type != OCONFIG_TYPE_STRING) {
+                                       child->values[1].type != OCONFIG_TYPE_STRING) {
                                WARNING("sensu attribute needs string arguments.");
                                continue;
                        }
@@ -1180,7 +1180,9 @@ static int sensu_config(oconfig_item_t *ci) /* {{{ */
                        strarray_add(&sensu_attrs, &sensu_attrs_num, child->values[0].value.string);
                        strarray_add(&sensu_attrs, &sensu_attrs_num, child->values[1].value.string);
 
-                       DEBUG("write_sensu: got attr: %s => %s", key, val);
+                       DEBUG("write_sensu plugin: New attribute: %s => %s",
+                                       child->values[0].value.string,
+                                       child->values[1].value.string);
                } else if (strcasecmp(child->key, "tag") == 0) {
                        char *tmp = NULL;
                        status = cf_util_get_string(child, &tmp);