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 quoted = true
} }
for l.value != _NEWLINE && l.value != _EOF { for l.value != _NEWLINE && l.value != _EOF {
println("SEEN", l.value, l.token)
switch l.value { switch l.value {
case _STRING: case _STRING:
s = append(s, l.token) s = append(s, l.token)
i++ i++
case _BLANK: case _BLANK:
if !quoted { if !quoted {
// i = 0, shouldn't happen here if i = 0 {
return nil, &ParseError{f, "bad TXT txt", l}
}
s[i-1] += l.token s[i-1] += l.token
l = <-c l = <-c
continue continue