Skip to content

Commit

Permalink
DELIA-67124 : Handle the JSON Subscribe Event (rdkcentral#65)
Browse files Browse the repository at this point in the history
DELIA-67124 : Handle the JSON Subscribe Event

Reason for change: The subscription request reached the NetworkManager and responded but due to the boot-up time no-cpu scenario, the success is NOT sent to consumer. So the consumer subscribes for the 2nd time, it returns already_exist error. It should be handled cleanly.
Test Procedure: As per DELIA-67124
Risks: Low
Signed-off-by: Karunakaran A <[email protected]>
  • Loading branch information
karuna2git authored Dec 20, 2024
1 parent 2b93fa7 commit 5ea8e5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NetworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ namespace WPEFramework
void Deinitialize(PluginHost::IShell *service) override;
string Information() const override;

//override Subscribe from IDispatcher
uint32_t Subscribe(const uint32_t channel, const string& event, const string& designator) override
{
NMLOG_DEBUG("Subscription received for %s event from channelID (%u) with designator as %s", event.c_str(), channel, designator.c_str());
JSONRPC::Subscribe(channel, event, designator);
return Core::ERROR_NONE;
}

// Do not allow copy/move constructors
NetworkManager(const NetworkManager &) = delete;
NetworkManager &operator=(const NetworkManager &) = delete;
Expand Down

0 comments on commit 5ea8e5b

Please sign in to comment.