Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3372 from bobo1on1/olddbus

fixed: compile with old versions of libdbus
  • Loading branch information...
commit eefb50dec6a1ae1726d91deebd11c2e82bf66150 2 parents 7a75ea5 + f41e95d
Arne Morten Kvarving authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
View
6 xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
@@ -38,6 +38,8 @@
CLogindUPowerSyscall::CLogindUPowerSyscall()
{
+ m_delayLockFd = -1;
+
CLog::Log(LOGINFO, "Selected Logind/UPower as PowerSyscall");
// Check if we have UPower. If not, we avoid any battery related operations.
@@ -264,6 +266,7 @@ bool CLogindUPowerSyscall::PumpPowerEvents(IPowerEventsCallback *callback)
void CLogindUPowerSyscall::InhibitDelayLock()
{
+#ifdef DBUS_TYPE_UNIX_FD
CDBusMessage message("org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", "Inhibit");
message.AppendArgument("sleep"); // what to inhibit
message.AppendArgument("XBMC"); // who
@@ -287,6 +290,9 @@ void CLogindUPowerSyscall::InhibitDelayLock()
}
CLog::Log(LOGDEBUG, "LogindUPowerSyscall - inhibit lock taken, fd %i", m_delayLockFd);
+#else
+ CLog::Log(LOGWARNING, "LogindUPowerSyscall - inhibit lock support not compiled in");
+#endif
}
void CLogindUPowerSyscall::ReleaseDelayLock()
Please sign in to comment.
Something went wrong with that request. Please try again.