mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Ignore known but unused packets
This commit is contained in:
parent
12365ae082
commit
aa4cc0bee6
1 changed files with 10 additions and 6 deletions
|
@ -203,25 +203,29 @@ impl Session {
|
||||||
self.debug_info();
|
self.debug_info();
|
||||||
self.send_packet(Pong, vec![0, 0, 0, 0]);
|
self.send_packet(Pong, vec![0, 0, 0, 0]);
|
||||||
}
|
}
|
||||||
Some(PongAck) => {}
|
|
||||||
Some(CountryCode) => {
|
Some(CountryCode) => {
|
||||||
let country = String::from_utf8(data.as_ref().to_owned()).unwrap();
|
let country = String::from_utf8(data.as_ref().to_owned()).unwrap();
|
||||||
info!("Country: {:?}", country);
|
info!("Country: {:?}", country);
|
||||||
self.0.data.write().unwrap().country = country;
|
self.0.data.write().unwrap().country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(StreamChunkRes) | Some(ChannelError) => {
|
Some(StreamChunkRes) | Some(ChannelError) => {
|
||||||
self.channel().dispatch(packet_type.unwrap(), data)
|
self.channel().dispatch(packet_type.unwrap(), data);
|
||||||
}
|
}
|
||||||
Some(AesKey) | Some(AesKeyError) => {
|
Some(AesKey) | Some(AesKeyError) => {
|
||||||
self.audio_key().dispatch(packet_type.unwrap(), data)
|
self.audio_key().dispatch(packet_type.unwrap(), data);
|
||||||
}
|
}
|
||||||
Some(MercuryReq) | Some(MercurySub) | Some(MercuryUnsub) | Some(MercuryEvent) => {
|
Some(MercuryReq) | Some(MercurySub) | Some(MercuryUnsub) | Some(MercuryEvent) => {
|
||||||
self.mercury().dispatch(packet_type.unwrap(), data)
|
self.mercury().dispatch(packet_type.unwrap(), data);
|
||||||
}
|
}
|
||||||
|
Some(PongAck)
|
||||||
|
| Some(SecretBlock)
|
||||||
|
| Some(LegacyWelcome)
|
||||||
|
| Some(UnknownDataAllZeros)
|
||||||
|
| Some(ProductInfo)
|
||||||
|
| Some(LicenseVersion) => {}
|
||||||
_ => {
|
_ => {
|
||||||
if let Some(packet_type) = PacketType::from_u8(cmd) {
|
if let Some(packet_type) = PacketType::from_u8(cmd) {
|
||||||
trace!("Ignoring {:?} packet", packet_type);
|
trace!("Ignoring {:?} packet with data {:?}", packet_type, data);
|
||||||
} else {
|
} else {
|
||||||
trace!("Ignoring unknown packet {:x}", cmd);
|
trace!("Ignoring unknown packet {:x}", cmd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue