fix some logind backend errors

This commit is contained in:
Victor Berger 2018-09-25 09:44:07 +02:00
parent 269c9a5c7c
commit 53d27264a2
2 changed files with 4 additions and 4 deletions

View File

@ -151,7 +151,7 @@ pub fn auto_session_bind<Data: 'static>(
) -> ::std::result::Result<BoundAutoSession, IoError> {
Ok(match notifier {
#[cfg(feature = "backend_session_logind")]
AutoSessionNotifier::Logind(logind) => BoundAutoSession::Logind(logind_session_bind(logind, handle)?),
AutoSessionNotifier::Logind(logind) => BoundAutoSession::Logind(logind_session_bind(logind, handle).map_err(|(e, _)| e)?),
AutoSessionNotifier::Direct(direct) => BoundAutoSession::Direct(direct_session_bind(direct, handle)?),
})
}

View File

@ -46,7 +46,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use systemd::login;
use wayland_server::calloop::generic::{Event, EventedRawFd, Generic};
use wayland_server::calloop::{Loophandle, Ready, Source};
use wayland_server::calloop::{LoopHandle, Ready, Source};
struct LogindSessionImpl {
conn: RefCell<Connection>,
@ -453,7 +453,7 @@ pub fn logind_session_bind<Data: 'static>(
let notifier = notifier.clone();
move |evt, _| notifier.event(evt)
})
}).collect::<::std::result::Result<Vec<Source<FdEvent>>, IoError>>()
}).collect::<::std::result::Result<Vec<Source<Generic<EventedRawFd>>>, IoError>>()
.map_err(|err| {
(
err,
@ -496,7 +496,7 @@ impl Drop for LogindSessionNotifier {
}
impl LogindSessionNotifier {
fn event(&mut self, event: Event) {
fn event(&mut self, event: Event<EventedRawFd>) {
let fd = event.source.borrow().0;
let readiness = event.readiness;
let conn = self.internal.conn.borrow();