Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions StateObserver/StateObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,12 @@ namespace WPEFramework {
checkForStandalone = false;
}
IARM_Bus_SYSMgr_GetSystemStates_Param_t param;
IARM_Bus_Call(IARM_BUS_SYSMGR_NAME, IARM_BUS_SYSMGR_API_GetSystemStates, &param, sizeof(param));
IARM_Result_t res = IARM_Bus_Call(IARM_BUS_SYSMGR_NAME, IARM_BUS_SYSMGR_API_GetSystemStates, &param, sizeof(param));
JsonArray response_arr;
for( std::vector<string>::iterator it = pname.begin(); it!= pname.end(); ++it )
if(res == IARM_RESULT_SUCCESS)
{
for( std::vector<string>::iterator it = pname.begin(); it!= pname.end(); ++it )
{
string err_str="none";
JsonObject devProp;
if(*it == SYSTEM_CHANNEL_MAP)
Expand Down Expand Up @@ -589,6 +591,7 @@ namespace WPEFramework {
}

}
}

response["properties"]=response_arr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of error, what would be the output of the json request. Make sure the response still comes as valid error message.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be empty array, @srikanth-vv . #6421 (comment)

#if(DEBUG_INFO)
Expand Down
13 changes: 7 additions & 6 deletions SystemServices/SystemServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1815,16 +1815,17 @@ namespace WPEFramework {
LOGINFO("Got cached NetworkStandbyMode: '%s'", m_networkStandbyMode ? "true" : "false");
}
else {
IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t param;
IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t param = {};
IARM_Result_t res = IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
IARM_BUS_PWRMGR_API_GetNetworkStandbyMode, (void *)&param,
sizeof(param));
bool nwStandby = param.bStandbyMode;

LOGWARN("getNetworkStandbyMode called, current NwStandbyMode is: %s\n",
nwStandby?("Enabled"):("Disabled"));
response["nwStandby"] = nwStandby;

if (IARM_RESULT_SUCCESS == res) {
bool nwStandby = param.bStandbyMode;

LOGWARN("getNetworkStandbyMode called, current NwStandbyMode is: %s\n",
nwStandby?("Enabled"):("Disabled"));
response["nwStandby"] = nwStandby;
retVal = true;
m_networkStandbyMode = nwStandby;
m_networkStandbyModeValid = true;
Expand Down
Loading