Browse Source

Update geoip package to version returning regular strings

Ask Bjørn Hansen 13 years ago
parent
commit
cbea2333fb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      serve.go

+ 2 - 2
serve.go

@@ -29,7 +29,7 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *Zone) {
 
 
 	label := getQuestionName(z, req)
 	label := getQuestionName(z, req)
 
 
-	var country *string
+	var country string
 	if geoIP != nil {
 	if geoIP != nil {
 		country = geoIP.GetCountry(w.RemoteAddr().String())
 		country = geoIP.GetCountry(w.RemoteAddr().String())
 		log.Println("Country:", country)
 		log.Println("Country:", country)
@@ -42,7 +42,7 @@ func serve(w dns.ResponseWriter, req *dns.Msg, z *Zone) {
 	}
 	}
 	m.Authoritative = true
 	m.Authoritative = true
 
 
-	labels := z.findLabels(label, *country, qtype)
+	labels := z.findLabels(label, country, qtype)
 	if labels == nil {
 	if labels == nil {
 		// return NXDOMAIN
 		// return NXDOMAIN
 		m.SetRcode(req, dns.RcodeNameError)
 		m.SetRcode(req, dns.RcodeNameError)