From 37f560cf6602021d296976e5cbaedc30544350e3 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Thu, 14 Mar 2024 10:24:16 -0700 Subject: [PATCH] Fix typos in comments and code --- README.md | 12 ++++++------ crates/core/src/bc/de.rs | 6 +++--- crates/core/src/bc/xml.rs | 16 ++++++++-------- crates/core/src/bc_protocol/abilityinfo.rs | 2 +- .../core/src/bc_protocol/connection/discovery.rs | 2 +- crates/core/src/bc_protocol/credentials.rs | 2 +- crates/core/src/bc_protocol/errors.rs | 6 +++--- crates/core/src/bc_protocol/floodlight.rs | 4 ++-- crates/core/src/bc_protocol/keepalive.rs | 2 +- crates/core/src/bc_protocol/ledstate.rs | 2 +- crates/core/src/bc_protocol/link.rs | 2 +- crates/core/src/bc_protocol/pirstate.rs | 6 +++--- crates/core/src/bc_protocol/ptz.rs | 2 +- crates/core/src/bc_protocol/pushinfo.rs | 2 +- crates/core/src/bc_protocol/siren.rs | 2 +- crates/core/src/bc_protocol/snap.rs | 4 ++-- crates/core/src/bc_protocol/stream.rs | 10 +++++----- crates/core/src/bc_protocol/stream_info.rs | 2 +- crates/core/src/bc_protocol/support.rs | 2 +- crates/core/src/bc_protocol/time.rs | 2 +- crates/core/src/bc_protocol/uid.rs | 2 +- crates/core/src/bc_protocol/version.rs | 2 +- crates/core/src/bcmedia/codex.rs | 2 +- crates/core/src/bcudp/codex.rs | 2 +- sample_config.toml | 2 +- src/common/instance.rs | 2 +- src/mqtt/mod.rs | 4 ++-- src/rtsp/stream.rs | 2 +- 28 files changed, 53 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 7d69c01..f25d0b4 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ features not yet in upstream master. **Minor Features**: - Improved error messages when missing gstreamer plugins -- Protocol more closely follows offical reolink format +- Protocol more closely follows official reolink format - Possibly can handle more simulatenous connections - More ways to connect to the camera. Including Relaying through reolink servers @@ -50,7 +50,7 @@ Install the latest [gstreamer](https://gstreamer.freedesktop.org/download/) (1.20.5 as of writing this). - **Windows**: ensure you install `full` when prompted in the MSI options. -- **Mac**: Install the dpkg version on the offical gstreamer website over +- **Mac**: Install the dpkg version on the official gstreamer website over the brew version - **Ubuntu/Debian**: These packages should work @@ -269,7 +269,7 @@ reflected in the rtsp These include changing the: -- Avaliable users +- Available users ```toml [[users]] @@ -284,7 +284,7 @@ These include changing the: permitted_users = [ "me" ] ``` -- Avaliable streams +- Available streams ```toml [[cameras]] @@ -324,7 +324,7 @@ enable_motion = false # motion detection # (limited battery drain since it # is a passive listening connection) # -enable_light = false # flood lights only avaliable on some camera +enable_light = false # flood lights only available on some camera # (limited battery drain since it # is a passive listening connection) # @@ -355,7 +355,7 @@ must be manually specified. features = ["floodlight"] ``` -Avaliable features are: +Available features are: - `floodlight`: This adds a light control to home assistant - `camera`: This adds a camera preview to home assistant. It is only updated diff --git a/crates/core/src/bc/de.rs b/crates/core/src/bc/de.rs index 473c7df..20b0c15 100644 --- a/crates/core/src/bc/de.rs +++ b/crates/core/src/bc/de.rs @@ -439,7 +439,7 @@ mod tests { #[test] // B800 seems to have a different header to the E1 and swann cameras - // the stream_type and message_num do not seem to set in the offical clients + // the stream_type and message_num do not seem to set in the official clients // // They also have extra streams fn test_bc_b800_externstream() { @@ -481,7 +481,7 @@ mod tests { #[test] // B800 seems to have a different header to the E1 and swann cameras - // the stream_type and message_num do not seem to set in the offical clients + // the stream_type and message_num do not seem to set in the official clients // // They also have extra streams fn test_bc_b800_substream() { @@ -523,7 +523,7 @@ mod tests { #[test] // B800 seems to have a different header to the E1 and swann cameras - // the stream_type and message_num do not seem to set in the offical clients + // the stream_type and message_num do not seem to set in the official clients // // They also have extra streams fn test_bc_b800_mainstream() { diff --git a/crates/core/src/bc/xml.rs b/crates/core/src/bc/xml.rs index dccacba..acce7ad 100644 --- a/crates/core/src/bc/xml.rs +++ b/crates/core/src/bc/xml.rs @@ -91,10 +91,10 @@ pub struct BcXml { /// Recieved on request for battery info #[yaserde(rename = "BatteryInfo")] pub battery_info: Option, - /// Recieved on request for a users persmissions/capabilitoes + /// Recieved on request for a users permissions/capabilities #[yaserde(rename = "AbilityInfo")] pub ability_info: Option, - /// Recieved on request for a users persmissions/capabilitoes + /// Recieved on request for a users permissions/capabilities #[yaserde(rename = "PushInfo")] pub push_info: Option, /// Recieved on request for a link type @@ -112,7 +112,7 @@ pub struct BcXml { /// The floodlight settings for automatically turning on/off on schedule/motion #[yaserde(rename = "FloodlightTask")] pub floodlight_task: Option, - /// For geting the zoom anf focus of the camera + /// For getting the zoom and focus of the camera #[yaserde(rename = "PtzZoomFocus")] pub ptz_zoom_focus: Option, /// For zooming the camera @@ -268,11 +268,11 @@ pub struct Extension { /// XML Version #[yaserde(attribute)] pub version: String, - /// If the subsequent payload is binary this will be set to 1. Otherwise it is ommited + /// If the subsequent payload is binary this will be set to 1. Otherwise it is omitted #[yaserde(rename = "binaryData")] pub binary_data: Option, /// Certain requests such `AbilitySupport` require to know which user this - /// ability support request is for (why camera dosen't know this based on who + /// ability support request is for (why camera doesn't know this based on who /// is logged in is unknown... Possible security hole) #[yaserde(rename = "userName")] pub user_name: Option, @@ -497,7 +497,7 @@ pub struct TalkConfig { /// audioStreamMode known values `"followVideoStream"` #[yaserde(rename = "audioStreamMode")] pub audio_stream_mode: String, - /// AudioConfig contans the details of the audio to follow + /// AudioConfig contains the details of the audio to follow #[yaserde(rename = "audioConfig")] pub audio_config: AudioConfig, } @@ -541,7 +541,7 @@ pub struct TalkAbility { /// audioStreamModes known values `"followVideoStream"` #[yaserde(rename = "audioStreamModeList")] pub audio_stream_mode_list: Vec, - /// AudioConfigs contans the details of the audio to follow + /// AudioConfigs contains the details of the audio to follow #[yaserde(rename = "audioConfigList")] pub audio_config_list: Vec, } @@ -706,7 +706,7 @@ pub struct AbilityInfo { pub image: Option, /// Video permissions pub video: Option, - /// Secutiry permissions + /// Security permissions pub security: Option, /// Replay permissions pub replay: Option, diff --git a/crates/core/src/bc_protocol/abilityinfo.rs b/crates/core/src/bc_protocol/abilityinfo.rs index ff82529..5103dee 100644 --- a/crates/core/src/bc_protocol/abilityinfo.rs +++ b/crates/core/src/bc_protocol/abilityinfo.rs @@ -30,7 +30,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/connection/discovery.rs b/crates/core/src/bc_protocol/connection/discovery.rs index 0b91b0f..1a5d93c 100644 --- a/crates/core/src/bc_protocol/connection/discovery.rs +++ b/crates/core/src/bc_protocol/connection/discovery.rs @@ -248,7 +248,7 @@ impl Discoverer { tokio::select! { v = async { loop { - let (reply, addr) = reply.next().await.ok_or(Error::ConnectionUnavaliable)??; + let (reply, addr) = reply.next().await.ok_or(Error::ConnectionUnavailable)??; if let Some(result) = map(reply, addr) { return Ok(result); } diff --git a/crates/core/src/bc_protocol/credentials.rs b/crates/core/src/bc_protocol/credentials.rs index ccff7e2..19eb411 100644 --- a/crates/core/src/bc_protocol/credentials.rs +++ b/crates/core/src/bc_protocol/credentials.rs @@ -7,7 +7,7 @@ use std::convert::TryInto; pub struct Credentials { /// The username to login to the camera with pub username: String, - /// The password to use for login. Some camera allow this to be ommited + /// The password to use for login. Some camera allow this to be omitted pub password: Option, } diff --git a/crates/core/src/bc_protocol/errors.rs b/crates/core/src/bc_protocol/errors.rs index 47471d6..2378cd7 100644 --- a/crates/core/src/bc_protocol/errors.rs +++ b/crates/core/src/bc_protocol/errors.rs @@ -36,8 +36,8 @@ pub enum Error { }, /// Raised when the camera responds with a status code over than OK - #[error(display = "Camera responded with Service Unavaliable: {}", _0)] - CameraServiceUnavaliable(u16), + #[error(display = "Camera responded with Service Unavailable: {}", _0)] + CameraServiceUnavailable(u16), /// Raised when the camera responds with a status code over than OK during login #[error(display = "Camera responded with Err during login")] @@ -115,7 +115,7 @@ pub enum Error { /// Raised when the camera cannot be found #[error(display = "Camera Not Findable")] - ConnectionUnavaliable, + ConnectionUnavailable, /// Raised when the subscription id dropped too soon #[error(display = "Dropped Subscriber")] diff --git a/crates/core/src/bc_protocol/floodlight.rs b/crates/core/src/bc_protocol/floodlight.rs index 76b320f..0e59715 100644 --- a/crates/core/src/bc_protocol/floodlight.rs +++ b/crates/core/src/bc_protocol/floodlight.rs @@ -129,7 +129,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { @@ -181,7 +181,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } Ok(()) diff --git a/crates/core/src/bc_protocol/keepalive.rs b/crates/core/src/bc_protocol/keepalive.rs index 3de5cbc..b1c7f31 100644 --- a/crates/core/src/bc_protocol/keepalive.rs +++ b/crates/core/src/bc_protocol/keepalive.rs @@ -2,7 +2,7 @@ use super::{BcCamera, Result}; use crate::bc::model::*; impl BcCamera { - /// Create a handller to respond to keep alive messages + /// Create a handler to respond to keep alive messages /// These messages are sent by the camera so we listen to /// a message ID rather than setting a message number and /// responding to it diff --git a/crates/core/src/bc_protocol/ledstate.rs b/crates/core/src/bc_protocol/ledstate.rs index a2a8d26..c6a01da 100644 --- a/crates/core/src/bc_protocol/ledstate.rs +++ b/crates/core/src/bc_protocol/ledstate.rs @@ -29,7 +29,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/link.rs b/crates/core/src/bc_protocol/link.rs index f81c0ec..10db6ff 100644 --- a/crates/core/src/bc_protocol/link.rs +++ b/crates/core/src/bc_protocol/link.rs @@ -27,7 +27,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/pirstate.rs b/crates/core/src/bc_protocol/pirstate.rs index a5242e0..94b5ffb 100644 --- a/crates/core/src/bc_protocol/pirstate.rs +++ b/crates/core/src/bc_protocol/pirstate.rs @@ -39,10 +39,10 @@ impl BcCamera { reties += 1; continue; } else { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } } else if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } else { // Valid message with response_code == 200 if let BcBody::ModernMsg(ModernMsg { @@ -101,7 +101,7 @@ impl BcCamera { { let msg = reply?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcMeta { diff --git a/crates/core/src/bc_protocol/ptz.rs b/crates/core/src/bc_protocol/ptz.rs index 985df32..d5e979e 100644 --- a/crates/core/src/bc_protocol/ptz.rs +++ b/crates/core/src/bc_protocol/ptz.rs @@ -325,7 +325,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/pushinfo.rs b/crates/core/src/bc_protocol/pushinfo.rs index 9da38b3..9b9d46e 100644 --- a/crates/core/src/bc_protocol/pushinfo.rs +++ b/crates/core/src/bc_protocol/pushinfo.rs @@ -64,7 +64,7 @@ impl BcCamera { sub.send(msg).await?; let msg = sub.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } Ok(()) diff --git a/crates/core/src/bc_protocol/siren.rs b/crates/core/src/bc_protocol/siren.rs index 5e664a4..06c0fa3 100644 --- a/crates/core/src/bc_protocol/siren.rs +++ b/crates/core/src/bc_protocol/siren.rs @@ -39,7 +39,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } Ok(()) diff --git a/crates/core/src/bc_protocol/snap.rs b/crates/core/src/bc_protocol/snap.rs index e199d8c..958f142 100644 --- a/crates/core/src/bc_protocol/snap.rs +++ b/crates/core/src/bc_protocol/snap.rs @@ -41,7 +41,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { @@ -132,7 +132,7 @@ impl BcCamera { } } else { // anything else is an error - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } // let binary_stream = sub_get.payload_stream(); diff --git a/crates/core/src/bc_protocol/stream.rs b/crates/core/src/bc_protocol/stream.rs index 60bbfd7..9572434 100644 --- a/crates/core/src/bc_protocol/stream.rs +++ b/crates/core/src/bc_protocol/stream.rs @@ -17,7 +17,7 @@ pub enum StreamKind { Sub, /// This stream represents a balance between SD and HD /// - /// It is only avaliable on some camera. If the camera dosen't + /// It is only available on some camera. If the camera doesn't /// support it the stream will be the same as the SD stream Extern, } @@ -155,7 +155,7 @@ impl BcCamera { StreamKind::Extern => 0, }; - // Theses are the numbers used with the offical client + // Theses are the numbers used with the official client // On an E1 and swann cameras: // - mainStream always has a value of 0 // - subStream always has a value of 1 @@ -271,7 +271,7 @@ impl BcCamera { msg_id: MSG_ID_VIDEO_STOP, .. } = msg.meta { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } } } => v, @@ -313,7 +313,7 @@ impl BcCamera { StreamKind::Extern => 0, }; - // Theses are the numbers used with the offical client + // Theses are the numbers used with the official client // On an E1 and swann cameras: // - mainStream always has a value of 0 // - subStream always has a value of 1 @@ -352,7 +352,7 @@ impl BcCamera { let reply = sub_video.recv().await?; if reply.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(reply.meta.response_code)); + return Err(Error::CameraServiceUnavailable(reply.meta.response_code)); } Ok(()) diff --git a/crates/core/src/bc_protocol/stream_info.rs b/crates/core/src/bc_protocol/stream_info.rs index af34614..0abc60d 100644 --- a/crates/core/src/bc_protocol/stream_info.rs +++ b/crates/core/src/bc_protocol/stream_info.rs @@ -27,7 +27,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/support.rs b/crates/core/src/bc_protocol/support.rs index 20df452..5adf6cf 100644 --- a/crates/core/src/bc_protocol/support.rs +++ b/crates/core/src/bc_protocol/support.rs @@ -26,7 +26,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/time.rs b/crates/core/src/bc_protocol/time.rs index fd28306..ae64db7 100644 --- a/crates/core/src/bc_protocol/time.rs +++ b/crates/core/src/bc_protocol/time.rs @@ -33,7 +33,7 @@ impl BcCamera { sub_get_general.send(get).await?; let msg = sub_get_general.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/uid.rs b/crates/core/src/bc_protocol/uid.rs index 553172a..252047d 100644 --- a/crates/core/src/bc_protocol/uid.rs +++ b/crates/core/src/bc_protocol/uid.rs @@ -25,7 +25,7 @@ impl BcCamera { sub_get.send(get).await?; let msg = sub_get.recv().await?; if msg.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable(msg.meta.response_code)); + return Err(Error::CameraServiceUnavailable(msg.meta.response_code)); } if let BcBody::ModernMsg(ModernMsg { diff --git a/crates/core/src/bc_protocol/version.rs b/crates/core/src/bc_protocol/version.rs index ef73345..5e33670 100644 --- a/crates/core/src/bc_protocol/version.rs +++ b/crates/core/src/bc_protocol/version.rs @@ -27,7 +27,7 @@ impl BcCamera { let modern_reply = sub_version.recv().await?; if modern_reply.meta.response_code != 200 { - return Err(Error::CameraServiceUnavaliable( + return Err(Error::CameraServiceUnavailable( modern_reply.meta.response_code, )); } diff --git a/crates/core/src/bcmedia/codex.rs b/crates/core/src/bcmedia/codex.rs index f0fe817..0d8b760 100644 --- a/crates/core/src/bcmedia/codex.rs +++ b/crates/core/src/bcmedia/codex.rs @@ -39,7 +39,7 @@ impl Decoder for BcMediaCodex { type Item = BcMedia; type Error = Error; - /// Since frames can cross EOF boundaries we overload this so it dosen't error if + /// Since frames can cross EOF boundaries we overload this so it doesn't error if /// there are bytes left on the stream fn decode_eof(&mut self, buf: &mut BytesMut) -> Result> { match self.decode(buf)? { diff --git a/crates/core/src/bcudp/codex.rs b/crates/core/src/bcudp/codex.rs index 5c82fef..30d1b48 100644 --- a/crates/core/src/bcudp/codex.rs +++ b/crates/core/src/bcudp/codex.rs @@ -34,7 +34,7 @@ impl Decoder for BcUdpCodex { type Item = BcUdp; type Error = Error; - /// Since frames can cross EOF boundaries we overload this so it dosen't error if + /// Since frames can cross EOF boundaries we overload this so it doesn't error if /// there are bytes left on the stream // fn decode_eof(&mut self, buf: &mut BytesMut) -> Result> { // match self.decode(buf)? { diff --git a/sample_config.toml b/sample_config.toml index 89ef291..85a7ea8 100644 --- a/sample_config.toml +++ b/sample_config.toml @@ -98,6 +98,6 @@ address = "192.168.1.245:9000" # camera to connect to with by setting the `channel_id` # # By default channel_id = 0. Eg the first connected camera on the device -# **Note**: that unlike in the offical client the numbering starts from 0 not 1. +# **Note**: that unlike in the official client the numbering starts from 0 not 1. # An 8 channel NVR would have channels 0 through 7 # channel_id = 0 diff --git a/src/common/instance.rs b/src/common/instance.rs index 9339403..ffcfae6 100644 --- a/src/common/instance.rs +++ b/src/common/instance.rs @@ -125,7 +125,7 @@ impl NeoInstance { if let Err(e) = &r { log::debug!("- Task Result: {e:?}"); } - if let Err(Some(neolink_core::Error::CameraServiceUnavaliable(400))) = r.as_ref().map_err(|e| e.downcast_ref::()) { + if let Err(Some(neolink_core::Error::CameraServiceUnavailable(400))) = r.as_ref().map_err(|e| e.downcast_ref::()) { // Retryable without a reconnect // Usually occurs when camera is starting up // or the connection is initialising diff --git a/src/mqtt/mod.rs b/src/mqtt/mod.rs index 94d2e61..4ac6070 100644 --- a/src/mqtt/mod.rs +++ b/src/mqtt/mod.rs @@ -467,7 +467,7 @@ async fn listen_on_camera(camera: NeoInstance, mqtt_instance: MqttInstance) -> R }).await; let image = match image { Err(e) => match e.downcast::() { - Ok(neolink_core::Error::CameraServiceUnavaliable(_)) => { + Ok(neolink_core::Error::CameraServiceUnavailable(_)) => { log::debug!("Image not supported"); futures::future::pending().await }, @@ -512,7 +512,7 @@ async fn listen_on_camera(camera: NeoInstance, mqtt_instance: MqttInstance) -> R }).await; let xml = match xml { Err(e) => match e.downcast::() { - Ok(neolink_core::Error::CameraServiceUnavaliable(_)) => { + Ok(neolink_core::Error::CameraServiceUnavailable(_)) => { log::debug!("Battery not supported"); futures::future::pending().await }, diff --git a/src/rtsp/stream.rs b/src/rtsp/stream.rs index 95f36a4..27e58c3 100644 --- a/src/rtsp/stream.rs +++ b/src/rtsp/stream.rs @@ -323,7 +323,7 @@ async fn stream_run( log::debug!("Path: {}", path); mounts.add_factory(path, factory.clone()); } - log::info!("{}: Avaliable at {}", name, paths.join(", ")); + log::info!("{}: Available at {}", name, paths.join(", ")); let stream_cancel = CancellationToken::new(); let drop_guard = stream_cancel.clone().drop_guard();