Signed-off-by: Mika Laitio <lamikr@pilppa.org>
int err_flg;
Data *data;
DataRange *dr;
+ Date sdate;
+ Date edate;
dev_lst = NULL;
controller = new DeviceManagerController();
if (data != NULL) {
log_debug("last data for device: %s\n", id.c_str());
data->printout();
+
+ edate = data->get_date();
delete(data);
+
+ edate.copy(&sdate);
+ edate.day = edate.day;
+ sdate.day = sdate.day - 2;
+ DataRange *dr2;
+
+ log_debug("first date: %s\n", sdate.to_string().c_str());
+ log_debug("last date: %s\n", edate.to_string().c_str());
+ dr2 = controller->get_data(id, &sdate, &edate, &err_flg);
+ dr2->printout();
+ delete(dr2);
}
+ delete(dr);
}
- delete(dr);
}
}
else {