File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 99#include " shellcmd.h"
1010#include " macaddress.h"
1111#include " warm_restart.h"
12+ #include < swss/redisutility.h>
1213
1314using namespace std ;
1415using namespace swss ;
@@ -438,6 +439,11 @@ bool IntfMgr::isIntfStateOk(const string &alias)
438439 }
439440 else if (m_statePortTable.get (alias, temp))
440441 {
442+ auto state_opt = swss::fvsGetValue (temp, " state" , true );
443+ if (!state_opt)
444+ {
445+ return false ;
446+ }
441447 SWSS_LOG_DEBUG (" Port %s is ready" , alias.c_str ());
442448 return true ;
443449 }
Original file line number Diff line number Diff line change 66#include " portmgr.h"
77#include " exec.h"
88#include " shellcmd.h"
9+ #include < swss/redisutility.h>
910
1011using namespace std ;
1112using namespace swss ;
@@ -87,6 +88,12 @@ bool PortMgr::isPortStateOk(const string &alias)
8788
8889 if (m_statePortTable.get (alias, temp))
8990 {
91+ auto state_opt = swss::fvsGetValue (temp, " state" , true );
92+ if (!state_opt)
93+ {
94+ return false ;
95+ }
96+
9097 SWSS_LOG_INFO (" Port %s is ready" , alias.c_str ());
9198 return true ;
9299 }
Original file line number Diff line number Diff line change 55#include " tokenize.h"
66#include " warm_restart.h"
77#include " portmgr.h"
8+ #include < swss/redisutility.h>
89
910#include < algorithm>
1011#include < iostream>
@@ -72,6 +73,13 @@ bool TeamMgr::isPortStateOk(const string &alias)
7273 return false ;
7374 }
7475
76+ auto state_opt = swss::fvsGetValue (temp, " state" , true );
77+ if (!state_opt)
78+ {
79+ SWSS_LOG_INFO (" Port %s is not ready" , alias.c_str ());
80+ return false ;
81+ }
82+
7583 return true ;
7684}
7785
You can’t perform that action at this time.
0 commit comments