mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
fix quit on timeout, and printing trailing dots.
git-svn-id: file:///svn/unbound/trunk@885 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
b26f289ccc
commit
1a4fadaf00
4 changed files with 6 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
22 January 2008: Wouter
|
||||
- library code for async in libunbound/unbound.c.
|
||||
- fix link testbound.
|
||||
- fixup exit bug in mini_event.
|
||||
|
||||
21 January 2008: Wouter
|
||||
- libworker work, netevent raw commpoints, write_msg, serialize.
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s)
|
|||
|
||||
if(rcode != 0) {
|
||||
d->q->res->rcode = rcode;
|
||||
d->q->msg_security = 0;
|
||||
d->q->msg_security = s;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -419,7 +419,6 @@ libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s)
|
|||
|
||||
/* canonname and results */
|
||||
d->q->msg_security = s;
|
||||
|
||||
libworker_enter_result(d->q->res, buf, d->w->env->scratch, s);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,8 @@ pretty_output(char* q, int t, int c, struct ub_val_result* result, int docname)
|
|||
printf("\n");
|
||||
}
|
||||
/* remove trailing . from long canonnames for nicer output */
|
||||
if(result->canonname && strlen(result->canonname) > 1)
|
||||
if(result->canonname && strlen(result->canonname) > 1 &&
|
||||
result->canonname[strlen(result->canonname)-1] == '.')
|
||||
result->canonname[strlen(result->canonname)-1] = 0;
|
||||
if(!result->havedata) {
|
||||
if(verb > 0) {
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ int event_base_dispatch(struct event_base* base)
|
|||
return -1;
|
||||
/* see if timeouts need handling */
|
||||
handle_timeouts(base, &now, &wait);
|
||||
if(base->need_to_exit)
|
||||
return 0;
|
||||
/* do select */
|
||||
if(handle_select(base, &wait) < 0) {
|
||||
if(base->need_to_exit)
|
||||
|
|
|
|||
Loading…
Reference in a new issue