mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-22 07:41:16 -05:00
fixup locking in test code.
git-svn-id: file:///svn/unbound/trunk@629 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a81e19a6eb
commit
463bd32b26
2 changed files with 7 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
21 September 2007: Wouter
|
21 September 2007: Wouter
|
||||||
- fixup empty_DS_name allocated in wrong region.
|
- fixup empty_DS_name allocated in wrong region.
|
||||||
|
- fixup testcode lock safety.
|
||||||
|
|
||||||
20 September 2007: Wouter
|
20 September 2007: Wouter
|
||||||
- fixup and test for NSEC wildcard with empty nonterminals.
|
- fixup and test for NSEC wildcard with empty nonterminals.
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,13 @@ entry_to_repinfo(struct entry* e, struct alloc_cache* alloc, struct region*
|
||||||
int ret;
|
int ret;
|
||||||
struct edns_data edns;
|
struct edns_data edns;
|
||||||
entry_to_buf(e, pkt);
|
entry_to_buf(e, pkt);
|
||||||
|
/* lock alloc lock to please lock checking software.
|
||||||
|
* alloc_special_obtain assumes it is talking to a ub-alloc,
|
||||||
|
* and does not need to perform locking. Here the alloc is
|
||||||
|
* the only one, so we lock it here */
|
||||||
|
lock_quick_lock(&alloc->lock);
|
||||||
ret = reply_info_parse(pkt, alloc, qi, rep, region, &edns);
|
ret = reply_info_parse(pkt, alloc, qi, rep, region, &edns);
|
||||||
|
lock_quick_unlock(&alloc->lock);
|
||||||
if(ret != 0) {
|
if(ret != 0) {
|
||||||
printf("parse code %d: %s\n", ret,
|
printf("parse code %d: %s\n", ret,
|
||||||
ldns_lookup_by_id(ldns_rcodes, ret)->name);
|
ldns_lookup_by_id(ldns_rcodes, ret)->name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue