Dbus cleanup

Use DBUS_NAME instead of DBUS_IFACE when requesting the name
Add missing method_return()s
Give different names for the bytearray arguments so that pydbus is not confused
This commit is contained in:
Guillaume Meunier
2020-06-06 18:11:14 +02:00
committed by Luke
parent c9ba06d6b4
commit 5f37a319c5
2 changed files with 21 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ use dbus::{channel::Sender, nonblock::Process};
use dbus_tokio::connection;
use log::{error, info, warn};
use rog_client::{DBUS_IFACE, DBUS_PATH};
use rog_aura::{DBUS_IFACE, DBUS_NAME, DBUS_PATH};
use std::error::Error;
use std::sync::{mpsc, Arc};
use std::time::{Duration, Instant};
@@ -84,7 +84,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
});
connection
.request_name(DBUS_IFACE, false, true, true)
.request_name(DBUS_NAME, false, true, true)
.await?;
let (aura_command_send, aura_command_recv) = mpsc::sync_channel::<AuraCommand>(1);