Skip to content

Commit

Permalink
[portsorch] fix bug in initializePort (sonic-net#753)
Browse files Browse the repository at this point in the history
setHostIntfsOperStatus accepts bool instead of sai_oper_status_t

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
  • Loading branch information
stepanblyschak authored and yxieca committed Jan 16, 2019
1 parent 947998b commit 6cf834c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,8 @@ bool PortsOrch::initializePort(Port &port)
/*
* always initialize Port SAI_HOSTIF_ATTR_OPER_STATUS based on oper_status value in appDB.
*/
if (!setHostIntfsOperStatus(port, port.m_oper_status))
bool isUp = port.m_oper_status == SAI_PORT_OPER_STATUS_UP;
if (!setHostIntfsOperStatus(port, isUp))
{
SWSS_LOG_WARN("Failed to set operation status %s to host interface %s",
operStatus.c_str(), port.m_alias.c_str());
Expand Down

0 comments on commit 6cf834c

Please sign in to comment.