From 523f47eb5856297b40cb2441d3e15f0b2747d0ad Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 25 Feb 2007 12:58:53 +0000 Subject: [PATCH] maximum backup (2 minutes) --- src/common/kernel/reports.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index 64945958b..1ca94e97a 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -47,6 +47,7 @@ /* libc includes */ #include +#include #include #include #include @@ -1267,7 +1268,7 @@ prepare_report(faction * f) int write_reports(faction * f, time_t ltime) { - int backup = 1; + int backup = 1, maxbackup = 128; boolean gotit = false; struct report_context ctx; @@ -1298,17 +1299,22 @@ write_reports(faction * f, time_t ltime) } } - puts(" DONE"); - if (!gotit) { - log_warning(("No report for faction %s!\n", factionid(f))); - } if (errno) { - sprintf(buf, "Error writing reports, waiting %u seconds before retry.\n", backup); + puts(" ERROR"); + sprintf(buf, "Waiting %u seconds before retry", backup); perror(buf); sleep(backup); - backup *= 2; + if (backup