mirror of
https://github.com/ZeusWPI/ZNS.git
synced 2024-11-21 21:41:10 +01:00
fix wildcard bug
This commit is contained in:
parent
2184d016ea
commit
05daa4e8fe
1 changed files with 8 additions and 2 deletions
|
@ -60,12 +60,18 @@ fn try_wildcard(question: &Question, connection: &mut PgConnection) -> Result<Ve
|
||||||
} else {
|
} else {
|
||||||
let mut qname = question.qname.clone();
|
let mut qname = question.qname.clone();
|
||||||
qname[0] = String::from("*");
|
qname[0] = String::from("*");
|
||||||
get_from_database(
|
Ok(get_from_database(
|
||||||
&qname,
|
&qname,
|
||||||
Some(question.qtype.clone()),
|
Some(question.qtype.clone()),
|
||||||
question.qclass.clone(),
|
question.qclass.clone(),
|
||||||
connection,
|
connection,
|
||||||
)
|
)?
|
||||||
|
.into_iter()
|
||||||
|
.map(|mut rr| {
|
||||||
|
rr.name = question.qname.clone();
|
||||||
|
rr
|
||||||
|
})
|
||||||
|
.collect())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue