Txt record parsing works -- need to look at the on-the-wire stuff

This commit is contained in:
Miek Gieben 2012-02-12 21:52:20 +01:00
parent 6ddb9ab88b
commit 6279bb1917
1 changed files with 3 additions and 2 deletions

View File

@ -717,14 +717,15 @@ func setTXT(h RR_Header, c chan lex, f string) (RR, *ParseError) {
quoted = true
}
for l.value != _NEWLINE && l.value != _EOF {
println("SEEN", l.value, l.token)
switch l.value {
case _STRING:
s = append(s, l.token)
i++
case _BLANK:
if !quoted {
// i = 0, shouldn't happen here
if i = 0 {
return nil, &ParseError{f, "bad TXT txt", l}
}
s[i-1] += l.token
l = <-c
continue