mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Requesting dbus name after finishing initalizaction
This commit is contained in:
@@ -74,8 +74,7 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
let mut tasks: Vec<Box<dyn CtrlTask + Send>> = Vec::new();
|
||||
// Start zbus server
|
||||
let connection = Connection::new_system()?;
|
||||
fdo::DBusProxy::new(&connection)?
|
||||
.request_name(DBUS_NAME, fdo::RequestNameFlags::ReplaceExisting.into())?;
|
||||
let fdo_connection = fdo::DBusProxy::new(&connection)?;
|
||||
let mut object_server = ObjectServer::new(&connection);
|
||||
|
||||
let config = Config::load();
|
||||
@@ -195,6 +194,9 @@ fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
// })
|
||||
// .ok();
|
||||
|
||||
// Request dbus name after finishing initalizing all functions
|
||||
fdo_connection.request_name(DBUS_NAME, fdo::RequestNameFlags::ReplaceExisting.into())?;
|
||||
|
||||
// Loop to check errors and iterate zbus server
|
||||
loop {
|
||||
if let Err(err) = &handle {
|
||||
|
||||
Reference in New Issue
Block a user