File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 9
9
#include " shellcmd.h"
10
10
#include " macaddress.h"
11
11
#include " warm_restart.h"
12
+ #include < swss/redisutility.h>
12
13
13
14
using namespace std ;
14
15
using namespace swss ;
@@ -438,6 +439,11 @@ bool IntfMgr::isIntfStateOk(const string &alias)
438
439
}
439
440
else if (m_statePortTable.get (alias, temp))
440
441
{
442
+ auto state_opt = swss::fvsGetValue (temp, " state" , true );
443
+ if (!state_opt)
444
+ {
445
+ return false ;
446
+ }
441
447
SWSS_LOG_DEBUG (" Port %s is ready" , alias.c_str ());
442
448
return true ;
443
449
}
Original file line number Diff line number Diff line change 6
6
#include " portmgr.h"
7
7
#include " exec.h"
8
8
#include " shellcmd.h"
9
+ #include < swss/redisutility.h>
9
10
10
11
using namespace std ;
11
12
using namespace swss ;
@@ -87,6 +88,12 @@ bool PortMgr::isPortStateOk(const string &alias)
87
88
88
89
if (m_statePortTable.get (alias, temp))
89
90
{
91
+ auto state_opt = swss::fvsGetValue (temp, " state" , true );
92
+ if (!state_opt)
93
+ {
94
+ return false ;
95
+ }
96
+
90
97
SWSS_LOG_INFO (" Port %s is ready" , alias.c_str ());
91
98
return true ;
92
99
}
Original file line number Diff line number Diff line change 5
5
#include " tokenize.h"
6
6
#include " warm_restart.h"
7
7
#include " portmgr.h"
8
+ #include < swss/redisutility.h>
8
9
9
10
#include < algorithm>
10
11
#include < iostream>
@@ -72,6 +73,13 @@ bool TeamMgr::isPortStateOk(const string &alias)
72
73
return false ;
73
74
}
74
75
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
+
75
83
return true ;
76
84
}
77
85
You can’t perform that action at this time.
0 commit comments