projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f95cd45
)
update the configuration file reader to ignore semi-colons
author
aland
<aland>
Tue, 5 Sep 2000 14:40:22 +0000
(14:40 +0000)
committer
aland
<aland>
Tue, 5 Sep 2000 14:40:22 +0000
(14:40 +0000)
src/lib/token.c
patch
|
blob
|
history
src/main/conffile.c
patch
|
blob
|
history
diff --git
a/src/lib/token.c
b/src/lib/token.c
index
f0a6b04
..
ebe1dac
100644
(file)
--- a/
src/lib/token.c
+++ b/
src/lib/token.c
@@
-38,6
+38,7
@@
static const TOKEN tokens[] = {
{ "<=", T_OP_LE, },
{ "<", T_OP_LT, },
{ "#", T_HASH, },
+ { ";", T_SEMICOLON, },
{ NULL, 0, },
};
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
b9a5430
..
d53352e
100644
(file)
--- a/
src/main/conffile.c
+++ b/
src/main/conffile.c
@@
-370,7
+370,6
@@
static CONF_SECTION *cf_section_read(const char *cf, int *lineno, FILE *fp,
/*
* Perhaps a subsection.
*/
-
if (t2 == T_LCBRACE || t3 == T_LCBRACE) {
css = cf_section_read(cf, lineno, fp, buf1,
t2==T_LCBRACE ? NULL : buf2, cs);
@@
-384,6
+383,11
@@
static CONF_SECTION *cf_section_read(const char *cf, int *lineno, FILE *fp,
}
/*
+ * Ignore semi-colons.
+ */
+ if (*buf2 == ';') *buf2 = '\0';
+
+ /*
* Must be a normal attr = value line.
*/
if (buf1[0] != 0 && buf2[0] == 0 && buf3[0] == 0) {