Compare commits
1 commit
05907e16e8
...
f662a6784e
| Author | SHA1 | Date | |
|---|---|---|---|
| f662a6784e |
1 changed files with 1 additions and 29 deletions
|
|
@ -122,15 +122,6 @@ impl Agent {
|
||||||
) -> zbus::fdo::Result<()> {
|
) -> zbus::fdo::Result<()> {
|
||||||
tracing::debug!(?device, passkey, entered, "display_passkey");
|
tracing::debug!(?device, passkey, entered, "display_passkey");
|
||||||
|
|
||||||
_ = self
|
|
||||||
.message_sender
|
|
||||||
.send(Message::DisplayPasskey {
|
|
||||||
device,
|
|
||||||
passkey,
|
|
||||||
entered,
|
|
||||||
})
|
|
||||||
.await;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -159,14 +150,6 @@ impl Agent {
|
||||||
) -> zbus::fdo::Result<()> {
|
) -> zbus::fdo::Result<()> {
|
||||||
tracing::debug!(?device, pin_code, "display_pin_code");
|
tracing::debug!(?device, pin_code, "display_pin_code");
|
||||||
|
|
||||||
_ = self
|
|
||||||
.message_sender
|
|
||||||
.send(Message::DisplayPinCode {
|
|
||||||
device,
|
|
||||||
pincode: pin_code,
|
|
||||||
})
|
|
||||||
.await;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,18 +173,7 @@ impl Agent {
|
||||||
async fn request_authorization(&mut self, device: OwnedObjectPath) -> zbus::fdo::Result<()> {
|
async fn request_authorization(&mut self, device: OwnedObjectPath) -> zbus::fdo::Result<()> {
|
||||||
tracing::debug!(?device, "request_authorization");
|
tracing::debug!(?device, "request_authorization");
|
||||||
|
|
||||||
let (response, response_rx) = oneshot::channel::<bool>();
|
Ok(())
|
||||||
|
|
||||||
_ = self
|
|
||||||
.message_sender
|
|
||||||
.send(Message::RequestAuthorization { device, response })
|
|
||||||
.await;
|
|
||||||
|
|
||||||
match response_rx.await {
|
|
||||||
Ok(true) => Ok(()),
|
|
||||||
Ok(false) => Err(zbus::fdo::Error::Failed("cancelled".to_string())),
|
|
||||||
Err(why) => Err(zbus::fdo::Error::Failed(why.to_string())),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This method gets called when the service daemon
|
/// This method gets called when the service daemon
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue