Skip to content

Commit

Permalink
Merge pull request rdkcentral#5339 from gomathishankar37/defect/LLAMA…
Browse files Browse the repository at this point in the history
…-14513

LLAMA-14513: Delay Unsolicited Maintenance start event in WAI-enabled case
  • Loading branch information
tdeva14 authored May 27, 2024
2 parents 6644f86 + cdc1edb commit 24c56c3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions MaintenanceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

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

## [1.0.35] - 2024-05-27
### Fixed
- Delay Unsolicited Maintenance start event in WAI-enabled case

## [1.0.34] - 2024-05-14
### Fixed
- Additional logging for MaintenanceManager WhoAmI's setPartnerId
Expand Down
25 changes: 21 additions & 4 deletions MaintenanceManager/MaintenanceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,22 @@ namespace WPEFramework {
uint8_t i=0;
string cmd="";
bool internetConnectStatus=false;
std::unique_lock<std::mutex> lck(m_callMutex);
bool delayMaintenanceStarted = false;

std::unique_lock<std::mutex> lck(m_callMutex);
LOGINFO("Executing Maintenance tasks");
m_statusMutex.lock();
MaintenanceManager::_instance->onMaintenanceStatusChange(MAINTENANCE_STARTED);
m_statusMutex.unlock();

#if defined(ENABLE_WHOAMI)
/* Purposefully delaying MAINTENANCE_STARTED status to honor POWER compliance */
if (UNSOLICITED_MAINTENANCE == g_maintenance_type) {
delayMaintenanceStarted = true;
}
#endif
if (!delayMaintenanceStarted) {
m_statusMutex.lock();
MaintenanceManager::_instance->onMaintenanceStatusChange(MAINTENANCE_STARTED);
m_statusMutex.unlock();
}

/* cleanup if not empty */
if(!tasks.empty()){
Expand Down Expand Up @@ -352,6 +363,12 @@ namespace WPEFramework {
return;
}

if (delayMaintenanceStarted) {
m_statusMutex.lock();
MaintenanceManager::_instance->onMaintenanceStatusChange(MAINTENANCE_STARTED);
m_statusMutex.unlock();
}

LOGINFO("Reboot_Pending :%s",g_is_reboot_pending.c_str());

if (UNSOLICITED_MAINTENANCE == g_maintenance_type){
Expand Down

0 comments on commit 24c56c3

Please sign in to comment.