iov used.

git-svn-id: file:///svn/unbound/trunk@207 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2007-03-29 09:26:54 +00:00
parent b907897790
commit e082f2ac48
2 changed files with 8 additions and 4 deletions
+4 -4
View File
@@ -289,11 +289,11 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
if((e=slabhash_lookup(worker->daemon->msg_cache, h, &qinfo, 0))) {
/* answer from cache */
log_info("answer from the cache");
/* id is still in the buffer, no need to touch it */
reply_info_answer((struct reply_info*)e->data,
ldns_buffer_read_u16_at(c->buffer, 2), c->buffer);
reply_info_answer_iov((struct reply_info*)e->data,
ldns_buffer_read_u16_at(c->buffer, 0),
ldns_buffer_read_u16_at(c->buffer, 2), repinfo);
lock_rw_unlock(&e->lock);
return 1;
return 0;
}
ldns_buffer_rewind(c->buffer);
/* perform memory allocation(s) */
+4
View File
@@ -1,3 +1,7 @@
29 March 2007: Wouter
- writev or sendmsg used when answering from cache.
This avoids a copy of the data.
28 March 2007: Wouter
- new config option: num-queries-per-thread.
- added tpkg test for answering three queries at the same time