Skip to content

Bug: Ignore of "sessionId" parameter in SecManager events causes conflicts with other components #54

@npoltorapavlo

Description

@npoltorapavlo

Problem/Opportunity

SecManager events have "sessionId" parameter to check whether session is related. If it's unrelated, it is created by other component and should not be handled.
By checking this component's code "sessionId" isn't checked in onAddWatermark or other event handlers and the logic is applied to all ids, including unrelated:

void SecManagerThunder::addWatermarkHandler(const JsonObject& parameters)
{
std::string param;
parameters.ToString(param);
MW_LOG_WARN("ContentSecurityManager::%s:%d i/p params: %s", __FUNCTION__, __LINE__, param.c_str());
if(getSchedulerStatus())
{
int graphicId = parameters["graphicId"].Number();
int zIndex = parameters["zIndex"].Number();
MW_LOG_WARN("ContentSecurityManager::%s:%d graphicId : %d index : %d ", __FUNCTION__, __LINE__, graphicId, zIndex);
ScheduleTask(PlayerAsyncTaskObj([graphicId, zIndex](void *data)

This is not proper handling of events and needs to be fixed.

Steps to reproduce

No response

Expected Behavior

Id parameters, such as session Id or graphic Id should be checked, whether they relate to your component

Actual Behavior

This component isn't handling events correctly

Notes (Optional)

Looks like the code is copy paste, see rdkcentral/aamp#745 for the same

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions