aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-03-16 09:51:03 +1300
committerTrent Nelson <trent.a.b.nelson@gmail.com>2014-03-21 16:58:34 -0600
commitabfee22c64b1d8af6fb9e61442c262042359c8be (patch)
treeb24cf58444a6fe0e718a1490af0157444f2d220a
parent2ba680b57dcb1b74ee7de5003c9fbce6e12ffe31 (diff)
Merge pull request #4420 from t4-ravenbird/woa-log-enable
woa - add logmsg when enable changed
-rw-r--r--xbmc/network/WakeOnAccess.cpp13
-rw-r--r--xbmc/network/WakeOnAccess.h2
2 files changed, 12 insertions, 3 deletions
diff --git a/xbmc/network/WakeOnAccess.cpp b/xbmc/network/WakeOnAccess.cpp
index 0b7a3ccd14..8031e2a2bb 100644
--- a/xbmc/network/WakeOnAccess.cpp
+++ b/xbmc/network/WakeOnAccess.cpp
@@ -652,15 +652,22 @@ void CWakeOnAccess::OnSettingsSaved()
}
}
+void CWakeOnAccess::SetEnabled(bool enabled)
+{
+ m_enabled = enabled;
+
+ CLog::Log(LOGNOTICE,"WakeOnAccess - Enabled:%s", m_enabled ? "TRUE" : "FALSE");
+}
+
void CWakeOnAccess::LoadFromXML()
{
bool enabled = CSettings::Get().GetBool("powermanagement.wakeonaccess");
- SetEnabled(enabled);
CXBMCTinyXML xmlDoc;
if (!xmlDoc.LoadFile(GetSettingFile()))
{
- CLog::Log(LOGNOTICE, "%s - unable to load:%s", __FUNCTION__, GetSettingFile().c_str());
+ if (enabled)
+ CLog::Log(LOGNOTICE, "%s - unable to load:%s", __FUNCTION__, GetSettingFile().c_str());
return;
}
@@ -675,6 +682,8 @@ void CWakeOnAccess::LoadFromXML()
CLog::Log(LOGNOTICE,"WakeOnAccess - Load settings :");
+ SetEnabled(enabled);
+
int tmp;
if (XMLUtils::GetInt(pRootElement, "netinittimeout", tmp, 0, 5 * 60))
m_netinit_sec = tmp;
diff --git a/xbmc/network/WakeOnAccess.h b/xbmc/network/WakeOnAccess.h
index ca61c02768..320fc534b1 100644
--- a/xbmc/network/WakeOnAccess.h
+++ b/xbmc/network/WakeOnAccess.h
@@ -61,7 +61,7 @@ private:
void LoadFromXML();
void SaveToXML();
- void SetEnabled(bool enabled) { m_enabled = enabled; }
+ void SetEnabled(bool enabled);
bool IsEnabled() const { return m_enabled; }
void QueueMACDiscoveryForHost(const CStdString& host);