mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
isc_buffer_putmem() is now in the library
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: xfrout.c,v 1.21 1999/10/29 06:36:00 marka Exp $ */
|
/* $Id: xfrout.c,v 1.22 1999/10/29 23:54:37 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -1066,16 +1066,6 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
isc_buffer_putmem(isc_buffer_t *b, void *src, unsigned int length)
|
|
||||||
{
|
|
||||||
isc_region_t avail;
|
|
||||||
isc_buffer_available(b, &avail);
|
|
||||||
INSIST(avail.length >= length);
|
|
||||||
memcpy(avail.base, src, length);
|
|
||||||
isc_buffer_add(b, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Arrange to send as much as we can of "stream" without blocking.
|
* Arrange to send as much as we can of "stream" without blocking.
|
||||||
*
|
*
|
||||||
|
@@ -1422,32 +1422,6 @@ journal_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *pos) {
|
|||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX this should be in isc/buffer.{h,c} */
|
|
||||||
|
|
||||||
static void
|
|
||||||
isc_buffer_putmem(isc_buffer_t *b, void *src, unsigned int length);
|
|
||||||
/*
|
|
||||||
* Store 'length' bytes of data starting at 'src' into 'b'.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
* 'b' is a valid buffer.
|
|
||||||
*
|
|
||||||
* The length of the unused region of 'b' is at least 'length'.
|
|
||||||
*
|
|
||||||
* Ensures:
|
|
||||||
* The used pointer in 'b' is advanced by 'length'.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
isc_buffer_putmem(isc_buffer_t *b, void *src, unsigned int length)
|
|
||||||
{
|
|
||||||
isc_region_t avail;
|
|
||||||
isc_buffer_available(b, &avail);
|
|
||||||
INSIST(avail.length >= length);
|
|
||||||
memcpy(avail.base, src, length);
|
|
||||||
isc_buffer_add(b, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
dns_result_t
|
dns_result_t
|
||||||
dns_journal_begin_transaction(dns_journal_t *j) {
|
dns_journal_begin_transaction(dns_journal_t *j) {
|
||||||
isc_uint32_t offset;
|
isc_uint32_t offset;
|
||||||
|
Reference in New Issue
Block a user