- bson_init (ret); /* matched by bson_destroy() */
- bson_append_date (ret, "time", (bson_date_t) CDTIME_T_TO_MS (vl->time));
- bson_append_string (ret, "host", vl->host);
- bson_append_string (ret, "plugin", vl->plugin);
- bson_append_string (ret, "plugin_instance", vl->plugin_instance);
- bson_append_string (ret, "type", vl->type);
- bson_append_string (ret, "type_instance", vl->type_instance);
-
- bson_append_start_array (ret, "values"); /* {{{ */
- for (int i = 0; i < ds->ds_num; i++)
- {
+ bson_init(ret); /* matched by bson_destroy() */
+ bson_append_date(ret, "time", (bson_date_t)CDTIME_T_TO_MS(vl->time));
+ bson_append_string(ret, "host", vl->host);
+ bson_append_string(ret, "plugin", vl->plugin);
+ bson_append_string(ret, "plugin_instance", vl->plugin_instance);
+ bson_append_string(ret, "type", vl->type);
+ bson_append_string(ret, "type_instance", vl->type_instance);
+
+ bson_append_start_array(ret, "values"); /* {{{ */
+ for (int i = 0; i < ds->ds_num; i++) {