addr fixup.

git-svn-id: file:///svn/unbound/trunk@387 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-06-13 14:47:01 +00:00
parent 3c1e638757
commit 526496a860
2 changed files with 8 additions and 0 deletions

View file

@ -3,6 +3,8 @@
ldns and libevent are linked statically. Default is off.
- make install and make uninstall. Works with static-exe and without.
installation of unbound binary and manual pages.
- alignement problem fix on solaris 64.
- fixup address in case of TCP error.
12 June 2007: Wouter
- num target queries was set to 0 at a bad time. Default it to 0 and

View file

@ -1006,6 +1006,7 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
struct comm_reply* rep)
{
struct serviced_query* sq = (struct serviced_query*)arg;
struct comm_reply r2;
sq->pending = NULL; /* removed after this callback */
if(error==NETEVENT_NOERROR && LDNS_RCODE_WIRE(ldns_buffer_begin(
c->buffer)) == LDNS_RCODE_FORMERR &&
@ -1018,6 +1019,11 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
return 0;
}
/* insert address into reply info */
if(!rep) {
/* create one if there isn't (on errors) */
rep = &r2;
r2.c = c;
}
memcpy(&rep->addr, &sq->addr, sq->addrlen);
rep->addrlen = sq->addrlen;
(void)rbtree_delete(sq->outnet->serviced, sq);