sleep/retry when errno during report writing, small fix

This commit is contained in:
Enno Rehling 2007-02-25 11:52:56 +00:00
parent 27c188ea1c
commit 546d3a2e1d
2 changed files with 2 additions and 5 deletions

View File

@ -1467,10 +1467,6 @@ report_computer(const char * filename, report_context * ctx)
report_crtypes(F, f->locale); report_crtypes(F, f->locale);
write_translations(F); write_translations(F);
reset_translations(); reset_translations();
if (errno) {
log_error(("%s\n", strerror(errno)));
errno = 0;
}
fclose(F); fclose(F);
return 0; return 0;
} }

View File

@ -1269,7 +1269,6 @@ write_reports(faction * f, time_t ltime)
{ {
int backup = 1; int backup = 1;
boolean gotit = false; boolean gotit = false;
report_type * rtype = report_types;
struct report_context ctx; struct report_context ctx;
ctx.f = f; ctx.f = f;
@ -1283,6 +1282,8 @@ write_reports(faction * f, time_t ltime)
get_addresses(&ctx); get_addresses(&ctx);
do { do {
report_type * rtype = report_types;
errno = 0; errno = 0;
printf("Reports for %s:", factionname(f)); printf("Reports for %s:", factionname(f));
fflush(stdout); fflush(stdout);