Skip to content

Commit

Permalink
Fix bug: unbound version check fail
Browse files Browse the repository at this point in the history
  • Loading branch information
wengao.han committed Jul 6, 2015
1 parent 0ca8333 commit 4256c37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Binary file added .unbound.go.un~
Binary file not shown.
19 changes: 9 additions & 10 deletions unbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,15 @@ func errorString(i int) string {
// unbound version from 1.4.20 (inclusive) and above fill in the Tll in the result
// check if we have such a version
func (u *Unbound) haveTtlFeature() bool {
if u.version[0] < 1 {
return false
}
if u.version[1] < 4 {
return false
}
if u.version[2] < 20 {
return false
}
return true
if u.version[0] < 1 {
return false
} else if u.version[0] == 1 && u.version[1] < 4 {
return false
} else if u.version[0] == 1 && u.version[1] == 4 && u.version[2] <= 20 {
return false
} else {
return true
}
}

// New wraps Unbound's ub_ctx_create.
Expand Down

0 comments on commit 4256c37

Please sign in to comment.