Skip to content

Commit 5f80d02

Browse files
authored
Merge pull request rdkcentral#5942 from bvanav648/RDKTV-33096-stable2
RDKTV-33096: Wpeframework crash with signature RDKShell::subscribeForSystemEvent
2 parents 9c53189 + 44f10a9 commit 5f80d02

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

RDKShell/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ 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+
## [1.6.4] - 2024-12-16
20+
### Added
21+
- Added proper synchronization in in RDKShell::subscribeForSystemEvent()
1922

2023
## [1.6.3] - 2024-09-09
2124
### Added

RDKShell/RDKShell.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
#define API_VERSION_NUMBER_MAJOR 1
5555
#define API_VERSION_NUMBER_MINOR 6
56-
#define API_VERSION_NUMBER_PATCH 3
56+
#define API_VERSION_NUMBER_PATCH 4
5757

5858
const string WPEFramework::Plugin::RDKShell::SERVICE_NAME = "org.rdk.RDKShell";
5959
//methods
@@ -947,9 +947,7 @@ namespace WPEFramework {
947947
}
948948
else if (requestName.compare("susbscribeSystemEvent") == 0)
949949
{
950-
gSubscribeMutex.lock();
951950
subscribeForSystemEvent("onSystemPowerStateChanged");
952-
gSubscribeMutex.unlock();
953951
std::cout << "subscribed system event " << std::endl;
954952
JsonObject joGetParams;
955953
JsonObject joGetResult;
@@ -8165,6 +8163,7 @@ namespace WPEFramework {
81658163

81668164
int32_t RDKShell::subscribeForSystemEvent(std::string event)
81678165
{
8166+
gSubscribeMutex.lock();
81688167
int32_t status = Core::ERROR_GENERAL;
81698168

81708169
PluginHost::IShell::state state;
@@ -8204,7 +8203,7 @@ namespace WPEFramework {
82048203
}
82058204
else
82068205
std::cout << "No Connection to SystemServices" << std::endl;
8207-
8206+
gSubscribeMutex.unlock();
82088207
return status;
82098208
}
82108209

0 commit comments

Comments
 (0)