Skip to content

Commit

Permalink
[ledd][multi-ASIC] Update to ledd based on sonic-swss-common updates (s…
Browse files Browse the repository at this point in the history
…onic-net#87)

* Updated based on sonic-swss-common changes to get the namespace (PR#378)
  • Loading branch information
judyjoseph authored Sep 3, 2020
1 parent 1d77bc9 commit e4ee852
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sonic-ledd/scripts/ledd
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class DaemonLedd(daemon_base.DaemonBase):
while True:
# Use timeout to prevent ignoring the signals we want to handle
# in signal_handler() (e.g. SIGTERM for graceful shutdown)
(state, c) = sel.select(SELECT_TIMEOUT)
(state, selectableObj) = sel.select(SELECT_TIMEOUT)

if state == swsscommon.Select.TIMEOUT:
# Do not flood log when select times out
Expand All @@ -100,9 +100,12 @@ class DaemonLedd(daemon_base.DaemonBase):
self.log_warning("sel.select() did not return swsscommon.Select.OBJECT")
continue

# Get the namespace from the selectable object and use it to index the SubscriberStateTable handle.
ns=c.getDbNamespace()
(key, op, fvp) = sst[ns].pop()
# Get the redisselect object from selectable object
redisSelectObj = swsscommon.CastSelectableToRedisSelectObj(selectableObj)
# Get the corresponding namespace from redisselect db connector object
namespace = redisSelectObj.getDbConnector().getNamespace()

(key, op, fvp) = sst[namespace].pop()
if fvp:
# TODO: Once these flag entries have been removed from the DB,
# we can remove this check
Expand Down

0 comments on commit e4ee852

Please sign in to comment.