2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +00:00

655. [bug] Improve error reporting on unexpected eof when loading

zones. [RT #611]
This commit is contained in:
Mark Andrews
2001-01-04 23:43:53 +00:00
parent 2b50457b87
commit 8dd5237a27
3 changed files with 18 additions and 26 deletions

View File

@@ -1,3 +1,6 @@
655. [bug] Improve error reporting on unexpected eof when loading
zones. [RT #611]
654. [bug] Origin was being forgotten in TCP retries in dig.
[RT574]

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.89 2000/12/28 02:31:20 marka Exp $ */
/* $Id: master.c,v 1.90 2001/01/04 23:43:53 marka Exp $ */
#include <config.h>
@@ -247,10 +247,13 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
case ISC_R_NOMEMORY:
return (ISC_R_NOMEMORY);
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
(*callbacks->error)(callbacks,
"dns_master_load: %s:%lu:"
" isc_lex_gettoken() failed: %s",
isc_lex_getsourcename(lex),
isc_lex_getsourceline(lex),
isc_result_totext(result));
return (ISC_R_UNEXPECTED);
return (result);
}
/*NOTREACHED*/
}
@@ -1896,7 +1899,7 @@ commit(dns_rdatacallbacks_t *callbacks, isc_lex_t *lex,
"ignoring out-of-zone data",
"dns_master_load",
isc_lex_getsourcename(lex),
isc_lex_getsourceline(lex));
isc_lex_getsourceline(lex) - 1);
ignore = ISC_TRUE;
}
do {

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.138 2001/01/02 04:24:52 gson Exp $ */
/* $Id: rdata.c,v 1.139 2001/01/04 23:43:52 marka Exp $ */
#include <config.h>
#include <ctype.h>
@@ -626,7 +626,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
char *name;
unsigned long line;
void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
isc_result_t iresult;
isc_result_t tresult;
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
if (rdata != NULL) {
@@ -663,24 +663,10 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
do {
name = isc_lex_getsourcename(lexer);
line = isc_lex_getsourceline(lexer);
iresult = isc_lex_gettoken(lexer, options, &token);
if (iresult != ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS) {
switch (iresult) {
case ISC_R_NOMEMORY:
result = ISC_R_NOMEMORY;
break;
case ISC_R_NOSPACE:
result = ISC_R_NOSPACE;
break;
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_lex_gettoken() failed: %s",
isc_result_totext(iresult));
result = ISC_R_UNEXPECTED;
break;
}
}
tresult = isc_lex_gettoken(lexer, options, &token);
if (tresult != ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
result = tresult;
if (callback != NULL)
fromtext_error(callback, callbacks, name,
line, NULL, result);