mirror of
https://git.mentality.rip/numas13/xash3d-master.git
synced 2025-01-22 04:44:31 +00:00
query: compile fix
This commit is contained in:
parent
e412741ef6
commit
d7e33170d3
@ -265,7 +265,7 @@ impl<'a> Scan<'a> {
|
|||||||
let mut buf = [0; 512];
|
let mut buf = [0; 512];
|
||||||
let packet = game::QueryServers {
|
let packet = game::QueryServers {
|
||||||
region: server::Region::RestOfTheWorld,
|
region: server::Region::RestOfTheWorld,
|
||||||
last: SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0),
|
last: SocketAddr::from((Ipv4Addr::UNSPECIFIED, 0)),
|
||||||
filter: self.cli.filter.as_str(),
|
filter: self.cli.filter.as_str(),
|
||||||
};
|
};
|
||||||
let n = packet.encode(&mut buf)?;
|
let n = packet.encode(&mut buf)?;
|
||||||
@ -306,7 +306,7 @@ impl<'a> Scan<'a> {
|
|||||||
if self.is_master(&from) {
|
if self.is_master(&from) {
|
||||||
if let Ok(packet) = master::QueryServersResponse::decode(&buf[..n]) {
|
if let Ok(packet) = master::QueryServersResponse::decode(&buf[..n]) {
|
||||||
if self.check_key(&from, packet.key) {
|
if self.check_key(&from, packet.key) {
|
||||||
set.extend(packet.iter());
|
set.extend(packet.iter::<SocketAddrV4>());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user