- Fix to print error from unbound-anchor for writing to the key

file, also when not verbose.
This commit is contained in:
W.C.A. Wijngaards 2021-08-12 16:06:02 +02:00
parent b13bcab089
commit fdae4cdbbb
2 changed files with 6 additions and 4 deletions

View file

@ -11,6 +11,8 @@
- For #519: yacc and lex. And fix python bindings, and test program
unbound-dnstap-socket.
- For #519: fix comments for doxygen.
- Fix to print error from unbound-anchor for writing to the key
file, also when not verbose.
5 August 2021: Wouter
- Tag for 1.13.2rc1 release.

View file

@ -2044,13 +2044,13 @@ write_builtin_anchor(const char* file)
const char* builtin_root_anchor = get_builtin_ds();
FILE* out = fopen(file, "w");
if(!out) {
if(verb) printf("%s: %s\n", file, strerror(errno));
if(verb) printf(" could not write builtin anchor\n");
printf("could not write builtin anchor, to file %s: %s\n",
file, strerror(errno));
return;
}
if(!fwrite(builtin_root_anchor, strlen(builtin_root_anchor), 1, out)) {
if(verb) printf("%s: %s\n", file, strerror(errno));
if(verb) printf(" could not complete write builtin anchor\n");
printf("could not complete write builtin anchor, to file %s: %s\n",
file, strerror(errno));
}
fclose(out);
}