mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
fixup libunbound message buffer.
git-svn-id: file:///svn/unbound/trunk@1412 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
c1ae463da5
commit
6e9d214816
2 changed files with 10 additions and 5 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
- fix reading included config files when chrooted.
|
- fix reading included config files when chrooted.
|
||||||
Give full path names for include files.
|
Give full path names for include files.
|
||||||
Relative path names work if the start dir equals the working dir.
|
Relative path names work if the start dir equals the working dir.
|
||||||
|
- fix libunbound message transport when no packet buffer is available.
|
||||||
|
|
||||||
5 January 2009: Wouter
|
5 January 2009: Wouter
|
||||||
- fixup getaddrinfo failure handling for remote control port.
|
- fixup getaddrinfo failure handling for remote control port.
|
||||||
|
|
|
||||||
|
|
@ -539,11 +539,15 @@ add_bg_result(struct libworker* w, struct ctx_query* q, ldns_buffer* pkt,
|
||||||
/* serialize and delete unneeded q */
|
/* serialize and delete unneeded q */
|
||||||
if(w->is_bg_thread) {
|
if(w->is_bg_thread) {
|
||||||
lock_basic_lock(&w->ctx->cfglock);
|
lock_basic_lock(&w->ctx->cfglock);
|
||||||
q->msg_len = ldns_buffer_remaining(pkt);
|
if(pkt) {
|
||||||
q->msg = memdup(ldns_buffer_begin(pkt), q->msg_len);
|
q->msg_len = ldns_buffer_remaining(pkt);
|
||||||
if(!q->msg)
|
q->msg = memdup(ldns_buffer_begin(pkt), q->msg_len);
|
||||||
msg = context_serialize_answer(q, UB_NOMEM, NULL, &len);
|
if(!q->msg)
|
||||||
else msg = context_serialize_answer(q, err, NULL, &len);
|
msg = context_serialize_answer(q, UB_NOMEM,
|
||||||
|
NULL, &len);
|
||||||
|
else msg = context_serialize_answer(q, err,
|
||||||
|
NULL, &len);
|
||||||
|
} else msg = context_serialize_answer(q, err, NULL, &len);
|
||||||
lock_basic_unlock(&w->ctx->cfglock);
|
lock_basic_unlock(&w->ctx->cfglock);
|
||||||
} else {
|
} else {
|
||||||
msg = context_serialize_answer(q, err, pkt, &len);
|
msg = context_serialize_answer(q, err, pkt, &len);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue