Renaming ntmake.pl to ntmake.PL (r1742) had unforseen side effects. At least
[rrdtool.git] / src / rrd_update.c
index 108dcbb..fa50929 100644 (file)
@@ -449,7 +449,7 @@ int rrd_update(
     {
         rc = rrdc_update (argv[optind], /* file */
                           argc - optind - 1, /* values_num */
-                          (void *) (argv + optind + 1)); /* values */
+                          (const char *const *) (argv + optind + 1)); /* values */
         if (rc > 0)
             rrd_set_error("Failed sending the values to rrdcached: %s",
                           rrd_strerror (rc));
@@ -519,6 +519,7 @@ int _rrd_update(
         goto err_out;
     }
 
+    rrd_init(&rrd);
     if ((rrd_file = rrd_open(filename, &rrd, RRD_READWRITE)) == NULL) {
         goto err_free;
     }
@@ -1927,6 +1928,8 @@ static int write_to_rras(
                 (rrd_file, rrd, rra_idx, scratch_idx,
                  pcdp_summary, rra_time) == -1)
                 return -1;
+
+            rrd_notify_row(rrd_file, rra_idx, rra_pos_new, rra_time);
         }
 
         rra_start += rra_def->row_cnt * ds_cnt * sizeof(rrd_value_t);
@@ -1964,7 +1967,7 @@ static int write_RRA_row(
             /* append info to the return hash */
             *pcdp_summary = rrd_info_push(*pcdp_summary,
                                           sprintf_alloc
-                                          ("[%d]RRA[%s][%lu]DS[%s]", rra_time,
+                                          ("[%lli]RRA[%s][%lu]DS[%s]", rra_time,
                                            rrd->rra_def[rra_idx].cf_nam,
                                            rrd->rra_def[rra_idx].pdp_cnt,
                                            rrd->ds_def[ds_idx].ds_nam),