Fixed two issues:
1. Issue where the default context for initiating each ptp service
context was incorrectly being copied by reference.
On startup, the initial context for each ptp service was set to default
values with a copy-by-reference resulting in updates propagating to each
instance when they shouldn't. Corrected the initialization to copy by
value instead. This fixes an issue where subscription notifications
were reporting the wrong status, ie. if one ptp4l instance is Freerun,
all ptp4l instances were being updated to Freerun. Fix ensures that only
the affected instance is updated.
2. Nodes running as master now change out of locked state when their
ports are FAULTY.
The original logic did not consider the port state for master nodes.
Added check to change the ptp4l lock status when ports enter a fault
state.
Test Plan:
PASS: Build and deploy ptp-notification app
PASS: Multiple ptp instance contexts are updated independently and
notifications now report correct state.
PASS: Master nodes transition their ptp4l status when ports go faulty.
Story: 2010056
Task: 46417
Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I3d2bfa62efeefc5aca282d80eccc5d825d7ef900