Skip to content

RDKEMW-16000: Add refreshHandles in libds.#172

Open
santoshcomcast wants to merge 2 commits intodevelopfrom
topic/RDKEMW-16000-refresh-handels
Open

RDKEMW-16000: Add refreshHandles in libds.#172
santoshcomcast wants to merge 2 commits intodevelopfrom
topic/RDKEMW-16000-refresh-handels

Conversation

@santoshcomcast
Copy link
Copy Markdown
Contributor

Reason for change: Broadcast IARM_BUS_DSMGR_EVENT_RESTARTED from dsmgr.
Test Procedure: refer RDKEMW-16000
Risks: High
Signed-off-by:gsanto722 grandhi_santoshkumar@comcast.com

Reason for change: These refreshHandles() api calls when dsmgr restart.
Test Procedure: refer RDKEMW-16000
Risks: High
Signed-off-by:gsanto722 <grandhi_santoshkumar@comcast.com>
@santoshcomcast santoshcomcast requested a review from a team as a code owner March 26, 2026 14:05
Copilot AI review requested due to automatic review settings March 26, 2026 14:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an IARM bus event broadcast to let libds clients know that dsmgr has restarted and HAL handles are valid again, and updates the systemd unit to ensure dsmgr is restarted automatically.

Changes:

  • Broadcast IARM_BUS_DSMGR_EVENT_RESTARTED at the end of DSMgr_Start() after init/resolution/platform setup.
  • Add Restart=always to conf/dsmgr.service so dsmgr is automatically restarted by systemd.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
dsmgr/dsMgr.c Broadcasts a new “restarted” event to notify clients they should refresh stale handles after a dsmgr restart.
conf/dsmgr.service Configures systemd to always restart dsmgr.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dsmgr/dsMgr.c
Comment on lines +339 to +345
/* Notify all libds clients (e.g. DisplaySettings plugin) that dsmgr has
* fully restarted and all HAL handles are now valid.
*
* Clients that registered for IARM_BUS_DSMGR_EVENT_RESTARTED will call
* refreshAllHandles() on their local config singletons to replace any
* stale intptr_t handles left over from the previous dsmgr process.
*
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The PR title/description references adding refreshHandles in libds, but this change set only updates dsmgr startup behavior and the systemd unit. If the libds-side API/event handling changes are required for this feature to work, they should be included here; otherwise please update the PR title/description to match what’s actually being changed.

Copilot uses AI. Check for mistakes.
Comment thread dsmgr/dsMgr.c
Comment on lines +356 to +359
iarmStatus = IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
(IARM_EventId_t)IARM_BUS_DSMGR_EVENT_RESTARTED,
(void *)&eventData, sizeof(eventData));
}
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This uses IARM_BUS_DSMGR_EVENT_RESTARTED, but that event ID needs to be part of the DSMgr public event enum and within the range registered via IARM_Bus_RegisterEvent(IARM_BUS_DSMGR_EVENT_MAX). In this repo there are no other references/definitions of IARM_BUS_DSMGR_EVENT_RESTARTED, so please ensure the corresponding header/enum (and *_EVENT_MAX) is updated in the same change set or the required dependency bump is included; otherwise the broadcast will fail (or the build may break if the symbol is undefined).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants