aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/Application.cpp3
-rw-r--r--xbmc/interfaces/json-rpc/schema/notifications.json6
-rw-r--r--xbmc/interfaces/json-rpc/schema/version.txt2
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.cpp4
4 files changed, 10 insertions, 5 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index e0d40c9911..875ca391d6 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -3481,7 +3481,8 @@ void CApplication::Stop(int exitCode)
{
try
{
- CVariant vExitCode(exitCode);
+ CVariant vExitCode(CVariant::VariantTypeObject);
+ vExitCode["exitcode"] = exitCode;
CAnnouncementManager::Get().Announce(System, "xbmc", "OnQuit", vExitCode);
SaveFileState(true);
diff --git a/xbmc/interfaces/json-rpc/schema/notifications.json b/xbmc/interfaces/json-rpc/schema/notifications.json
index 262781179f..77d7311e7c 100644
--- a/xbmc/interfaces/json-rpc/schema/notifications.json
+++ b/xbmc/interfaces/json-rpc/schema/notifications.json
@@ -248,7 +248,11 @@
"description": "XBMC will be closed.",
"params": [
{ "name": "sender", "type": "string", "required": true },
- { "name": "data", "type": "null", "required": true }
+ { "name": "data", "type": "object", "required": true,
+ "properties": {
+ "exitcode": { "type": "integer", "minimum": 0, "required": true }
+ }
+ }
],
"returns": null
},
diff --git a/xbmc/interfaces/json-rpc/schema/version.txt b/xbmc/interfaces/json-rpc/schema/version.txt
index 00825aa90a..7ecad14053 100644
--- a/xbmc/interfaces/json-rpc/schema/version.txt
+++ b/xbmc/interfaces/json-rpc/schema/version.txt
@@ -1 +1 @@
-6.20.1
+6.21.0
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index 1a8fd5949f..e80feb16bb 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -126,7 +126,7 @@ void CPeripheralCecAdapter::ResetMembers(void)
m_strMenuLanguage = "???";
m_lastKeypress = 0;
m_lastChange = VOLUME_CHANGE_NONE;
- m_iExitCode = 0;
+ m_iExitCode = EXITCODE_QUIT;
m_bIsMuted = false; // TODO fetch the correct initial value when system audiostatus is implemented in libCEC
m_bGoingToStandby = false;
m_bIsRunning = false;
@@ -149,7 +149,7 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady)
{
CSingleLock lock(m_critSection);
- m_iExitCode = (int)data["shuttingdown"].asInteger(0);
+ m_iExitCode = static_cast<int>(data["exitcode"].asInteger(EXITCODE_QUIT));
CAnnouncementManager::Get().RemoveAnnouncer(this);
StopThread(false);
}