mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-23 16:20:26 -05:00
- Fix log at high verbosity and memory allocation failure.
git-svn-id: file:///svn/unbound/trunk@3278 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
58542119a2
commit
24236a6d28
2 changed files with 7 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
24 November 2014: Wouter
|
||||||
|
- Fix log at high verbosity and memory allocation failure.
|
||||||
|
|
||||||
21 November 2014: Wouter
|
21 November 2014: Wouter
|
||||||
- Fix crash on multiple thread random usage on systems without
|
- Fix crash on multiple thread random usage on systems without
|
||||||
arc4random.
|
arc4random.
|
||||||
|
|
|
||||||
|
|
@ -773,15 +773,14 @@ log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* rep)
|
||||||
region, 65535, 1)) {
|
region, 65535, 1)) {
|
||||||
log_info("%s: log_dns_msg: out of memory", str);
|
log_info("%s: log_dns_msg: out of memory", str);
|
||||||
} else {
|
} else {
|
||||||
char* str = sldns_wire2str_pkt(sldns_buffer_begin(buf),
|
char* s = sldns_wire2str_pkt(sldns_buffer_begin(buf),
|
||||||
sldns_buffer_limit(buf));
|
sldns_buffer_limit(buf));
|
||||||
if(!str) {
|
if(!s) {
|
||||||
log_info("%s: log_dns_msg: ldns tostr failed", str);
|
log_info("%s: log_dns_msg: ldns tostr failed", str);
|
||||||
} else {
|
} else {
|
||||||
log_info("%s %s",
|
log_info("%s %s", str, s);
|
||||||
str, (char*)sldns_buffer_begin(buf));
|
|
||||||
}
|
}
|
||||||
free(str);
|
free(s);
|
||||||
}
|
}
|
||||||
sldns_buffer_free(buf);
|
sldns_buffer_free(buf);
|
||||||
regional_destroy(region);
|
regional_destroy(region);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue