aboutsummaryrefslogtreecommitdiff
path: root/src/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/output.c b/src/output.c
index 4b6e206..e2e8b92 100644
--- a/src/output.c
+++ b/src/output.c
@@ -177,7 +177,8 @@ do_update_output (struct monitor *mon, struct image_descr *dscr,
177 else 177 else
178 { 178 {
179 rc = draw_graph (fp, mon, queue, avg, timestamp, dscr->step, 179 rc = draw_graph (fp, mon, queue, avg, timestamp, dscr->step,
180 dscr->step*460 /* FIXME: must be queue->size * step */, 180 dscr->step*460
181 /*^ FIXME: must be queue->size * step */,
181 0, dscr->xgrid, dscr->ygrid); 182 0, dscr->xgrid, dscr->ygrid);
182 fclose (fp); 183 fclose (fp);
183 } 184 }
@@ -236,7 +237,7 @@ format_timestamp (FILE *fp, union value v, const char *fmt, int prec)
236 237
237int 238int
238update_output (struct monitor *mon, struct traffic_record *tr, 239update_output (struct monitor *mon, struct traffic_record *tr,
239 time_t timestamp, int force_update) 240 time_t timestamp, int flags)
240{ 241{
241 char *dirname = mkfilename (basedir, mon->dir, NULL); 242 char *dirname = mkfilename (basedir, mon->dir, NULL);
242 int rc; 243 int rc;
@@ -245,13 +246,17 @@ update_output (struct monitor *mon, struct traffic_record *tr,
245 char *tabfile = mkfilename (dirname, mon->name, ".tab"); 246 char *tabfile = mkfilename (dirname, mon->name, ".tab");
246 char *htmlname; 247 char *htmlname;
247 pp_value_t *p; 248 pp_value_t *p;
248 249 int force_update = flags & TAGR_UPD_FORCE;
250
249 if (!force_update) 251 if (!force_update)
250 { 252 {
251 if (read_symtab (&tab, tabfile)) 253 if (read_symtab (&tab, tabfile))
252 force_update = 1; 254 force_update = 1;
253 } 255 }
254 256
257 if (flags & TAGR_UPD_LASTTIME)
258 timestamp = tr->last.time;
259
255 rc = do_update_output (mon, &img_day, 260 rc = do_update_output (mon, &img_day,
256 &tr->day_hist, NULL, &tab, 261 &tr->day_hist, NULL, &tab,
257 timestamp, dirname, 1); 262 timestamp, dirname, 1);

Return to:

Send suggestions and report system problems to the System administrator.