mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
use the active region instead of the remaining region
This commit is contained in:
parent
6097a45fec
commit
26b0f58b6c
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.3 1999/01/19 05:38:31 marka Exp $ */
|
||||
/* $Id: rdata.c,v 1.4 1999/01/20 02:41:10 halley Exp $ */
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/lex.h>
|
||||
@ -327,7 +327,7 @@ txt_fromwire(isc_buffer_t *source, isc_buffer_t *target) {
|
||||
isc_region_t sregion;
|
||||
isc_region_t tregion;
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
n = *sregion.base + 1;
|
||||
if (n > sregion.length)
|
||||
return (DNS_R_UNKNOWN);
|
||||
@ -387,7 +387,7 @@ str_totext(char *source, isc_buffer_t *target) {
|
||||
|
||||
static isc_boolean_t
|
||||
buffer_empty(isc_buffer_t *source) {
|
||||
return((source->current == source->used) ? ISC_TRUE : ISC_FALSE);
|
||||
return((source->current == source->active) ? ISC_TRUE : ISC_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mx_15.c,v 1.4 1999/01/19 06:49:31 marka Exp $ */
|
||||
/* $Id: mx_15.c,v 1.5 1999/01/20 02:41:10 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_MX_15_H
|
||||
#define RDATA_GENERIC_MX_15_H
|
||||
@ -99,7 +99,7 @@ fromwire_mx(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
|
||||
dns_name_init(&name, NULL);
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (tregion.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mx_15.h,v 1.4 1999/01/19 06:49:31 marka Exp $ */
|
||||
/* $Id: mx_15.h,v 1.5 1999/01/20 02:41:10 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_MX_15_H
|
||||
#define RDATA_GENERIC_MX_15_H
|
||||
@ -99,7 +99,7 @@ fromwire_mx(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
|
||||
dns_name_init(&name, NULL);
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (tregion.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: soa_6.c,v 1.4 1999/01/19 06:49:32 marka Exp $ */
|
||||
/* $Id: soa_6.c,v 1.5 1999/01/20 02:41:11 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_SOA_6_H
|
||||
#define RDATA_GENERIC_SOA_6_H
|
||||
@ -155,7 +155,7 @@ fromwire_soa(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
if (result != DNS_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
|
||||
if (sregion.length != 20)
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: soa_6.h,v 1.4 1999/01/19 06:49:32 marka Exp $ */
|
||||
/* $Id: soa_6.h,v 1.5 1999/01/20 02:41:11 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_SOA_6_H
|
||||
#define RDATA_GENERIC_SOA_6_H
|
||||
@ -155,7 +155,7 @@ fromwire_soa(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
if (result != DNS_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
|
||||
if (sregion.length != 20)
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: a_1.c,v 1.3 1999/01/19 06:49:33 marka Exp $ */
|
||||
/* $Id: a_1.c,v 1.4 1999/01/20 02:41:11 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_IN_1_A_1_H
|
||||
#define RDATA_IN_1_A_1_H
|
||||
@ -88,7 +88,7 @@ fromwire_in_a(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
downcase = downcase; /* unused */
|
||||
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (sregion.length != 4)
|
||||
return (DNS_R_WIRE);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: a_1.h,v 1.3 1999/01/19 06:49:33 marka Exp $ */
|
||||
/* $Id: a_1.h,v 1.4 1999/01/20 02:41:11 halley Exp $ */
|
||||
|
||||
#ifndef RDATA_IN_1_A_1_H
|
||||
#define RDATA_IN_1_A_1_H
|
||||
@ -88,7 +88,7 @@ fromwire_in_a(dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
downcase = downcase; /* unused */
|
||||
|
||||
|
||||
isc_buffer_remaining(source, &sregion);
|
||||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (sregion.length != 4)
|
||||
return (DNS_R_WIRE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user