Skip to content

Commit 3406726

Browse files
committed
LLAMA-17233:Device fail to Enter deepsleep due to include timeout
Signed-off-by: apatel859 <[email protected]>
1 parent 9990604 commit 3406726

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

SystemServices/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.
1616

1717
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
1818

19+
## [3.4.5] - 2025-06-02
20+
### Updated
21+
- Updated setDeepSleepTimer to accept timeout only for 10 days max sec
22+
1923
## [3.4.4] - 2025-05-28
2024
### Security
2125
- Added catch to handle crash when reading territory

SystemServices/System.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@
15471547
}
15481548
},
15491549
"setDeepSleepTimer": {
1550-
"summary": "Sets the deep sleep timeout period.",
1550+
"summary": "Sets the deep sleep timeout period. Max accepted value 864000(10 days). If larger value passed it will consider a 0",
15511551
"params": {
15521552
"type":"object",
15531553
"properties": {

SystemServices/SystemServices.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ using namespace std;
6767

6868
#define API_VERSION_NUMBER_MAJOR 3
6969
#define API_VERSION_NUMBER_MINOR 4
70-
#define API_VERSION_NUMBER_PATCH 4
70+
#define API_VERSION_NUMBER_PATCH 5
7171

7272
#define MAX_REBOOT_DELAY 86400 /* 24Hr = 86400 sec */
7373
#define TR181_FW_DELAY_REBOOT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AutoReboot.fwDelayReboot"
@@ -1742,10 +1742,17 @@ namespace WPEFramework {
17421742
uint32_t SystemServices::setDeepSleepTimer(const JsonObject& parameters,
17431743
JsonObject& response)
17441744
{
1745+
LOGINFOMETHOD();
17451746
bool status = false;
17461747
IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t param;
17471748
if (parameters.HasLabel("seconds")) {
17481749
param.timeout = static_cast<unsigned int>(parameters["seconds"].Number());
1750+
// if maintenence time is more then 10 days set to 0
1751+
if(param.timeout<0 || param.timeout > 864000)
1752+
{
1753+
param.timeout = 0;
1754+
LOGINFO("setDeepSleepTimer updated timeout to :%d",param.timeout);
1755+
}
17491756
IARM_Result_t res = IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
17501757
IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut, (void *)&param,
17511758
sizeof(param));

0 commit comments

Comments
 (0)