Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
d1e971ba
Commit
d1e971ba
authored
Jul 09, 2000
by
Mark Andrews
Browse files
316. [bug] EOF mid line should be a error.
315. [bug] Handle non-empty blanks lines.
parent
ddc12c61
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
d1e971ba
316. [bug] EOF mid line should be a error.
315. [bug] Handle non-empty blanks lines.
314. [func] Inet controls named.conf statement can now have
any non-negative number of keys specified.
...
...
lib/dns/master.c
View file @
d1e971ba
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: master.c,v 1.5
5
2000/0
6/2
9 1
5
:5
5:19
marka Exp $ */
/* $Id: master.c,v 1.5
6
2000/0
7/0
9 1
2
:5
2:34
marka Exp $ */
#include <config.h>
...
...
@@ -186,6 +186,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
isc_boolean_t
finish_origin
=
ISC_FALSE
;
isc_boolean_t
finish_include
=
ISC_FALSE
;
isc_boolean_t
read_till_eol
=
ISC_FALSE
;
isc_boolean_t
initialws
;
char
*
include_file
=
NULL
;
isc_token_t
token
;
isc_result_t
result
=
ISC_R_UNEXPECTED
;
...
...
@@ -253,9 +254,18 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
memset
(
name_in_use
,
0
,
NBUFS
*
sizeof
(
isc_boolean_t
));
do
{
initialws
=
ISC_FALSE
;
GETTOKEN
(
lex
,
ISC_LEXOPT_INITIALWS
,
&
token
,
ISC_TRUE
);
if
(
token
.
type
==
isc_tokentype_eof
)
{
if
(
read_till_eol
)
{
(
*
callbacks
->
error
)(
callbacks
,
"dns_master_load: %s:%lu: unexpected end of file"
,
isc_lex_getsourcename
(
lex
),
isc_lex_getsourceline
(
lex
));
result
=
ISC_R_UNEXPECTEDEND
;
goto
cleanup
;
}
done
=
ISC_TRUE
;
continue
;
}
...
...
@@ -269,18 +279,10 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
continue
;
if
(
token
.
type
==
isc_tokentype_initialws
)
{
if
(
!
current_known
)
{
(
*
callbacks
->
error
)(
callbacks
,
"%s: %s:%lu: No current owner name"
,
"dns_master_load"
,
isc_lex_getsourcename
(
lex
),
isc_lex_getsourceline
(
lex
));
result
=
DNS_R_NOOWNER
;
goto
cleanup
;
}
/*
* Still working on the same name.
*/
initialws
=
ISC_TRUE
;
}
else
if
(
token
.
type
==
isc_tokentype_string
)
{
/*
...
...
@@ -545,7 +547,33 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
type
=
0
;
rdclass
=
0
;
GETTOKEN
(
lex
,
0
,
&
token
,
ISC_FALSE
);
GETTOKEN
(
lex
,
0
,
&
token
,
initialws
);
if
(
initialws
)
{
if
(
token
.
type
==
isc_tokentype_eol
)
{
read_till_eol
=
ISC_FALSE
;
continue
;
/* blank line */
}
if
(
token
.
type
==
isc_tokentype_eof
)
{
(
*
callbacks
->
error
)(
callbacks
,
"dns_master_load: %s:%lu: unexpected end of file"
,
isc_lex_getsourcename
(
lex
),
isc_lex_getsourceline
(
lex
));
result
=
ISC_R_UNEXPECTEDEND
;
goto
cleanup
;
}
if
(
!
current_known
)
{
(
*
callbacks
->
error
)(
callbacks
,
"%s: %s:%lu: No current owner name"
,
"dns_master_load"
,
isc_lex_getsourcename
(
lex
),
isc_lex_getsourceline
(
lex
));
result
=
DNS_R_NOOWNER
;
goto
cleanup
;
}
}
if
(
dns_rdataclass_fromtext
(
&
rdclass
,
&
token
.
value
.
as_textregion
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment