mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Avoid memory copying during send in TLS stream
At least at this point doing memory copying is not required. Probably it was a workaround for some problem in the earlier days of DoH, at this point it appears to be a waste of CPU cycles.
This commit is contained in:
parent
bd69c7c57c
commit
e301e1e3b8
1 changed files with 1 additions and 4 deletions
|
|
@ -676,7 +676,6 @@ isc__nm_async_tlssend(isc__networker_t *worker, isc__netievent_t *ev0) {
|
|||
|
||||
tls_do_bio(sock, NULL, req, false);
|
||||
done:
|
||||
isc_mem_free(sock->mgr->mctx, req->uvbuf.base);
|
||||
isc__nm_uvreq_put(&req, sock);
|
||||
return;
|
||||
}
|
||||
|
|
@ -704,9 +703,7 @@ isc__nm_tls_send(isc_nmhandle_t *handle, const isc_region_t *region,
|
|||
isc_nmhandle_attach(handle, &uvreq->handle);
|
||||
uvreq->cb.send = cb;
|
||||
uvreq->cbarg = cbarg;
|
||||
|
||||
uvreq->uvbuf.base = isc_mem_allocate(sock->mgr->mctx, region->length);
|
||||
memmove(uvreq->uvbuf.base, region->base, region->length);
|
||||
uvreq->uvbuf.base = (char *)region->base;
|
||||
uvreq->uvbuf.len = region->length;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue