Patch rrd_lastupdate_use_ds_name_as_index for rrd Bug #61316
Patch version 2012-03-07 10:04 UTC
Return to Bug #61316 |
Download this patch
Patch Revisions:
Developer: david@nfrance.com
--- rrd-1.0.5/rrd.c 2011-11-16 18:11:08.000000000 +0100
+++ rrd-1.0.5.modified/rrd.c 2012-03-07 10:51:50.000000000 +0100
@@ -286,16 +286,8 @@
array_init(zv_data_array);
for (i = 0; i < ds_cnt; i++) {
- /* last_update is key in data array */
- zval *zv_timestamp;
- MAKE_STD_ZVAL(zv_timestamp);
- ZVAL_LONG(zv_timestamp, last_update);
- convert_to_string(zv_timestamp);
-
- add_assoc_string(zv_data_array, Z_STRVAL_P(zv_timestamp), last_ds[i], 1);
-
+ add_assoc_string(zv_data_array, ds_namv[i], last_ds[i], 1);
free(last_ds[i]);
- zval_dtor(zv_timestamp);
}
free(last_ds);
add_assoc_zval(return_value, "data", zv_data_array);
|