@@ -1312,8 +1312,10 @@ bool PortsOrch::bake()
1312
1312
1313
1313
// Check the APP_DB port table for warm reboot
1314
1314
vector<FieldValueTuple> tuples;
1315
- bool foundPortConfigDone = m_portTable->get (" PortConfigDone" , tuples);
1316
- SWSS_LOG_NOTICE (" foundPortConfigDone = %d" , foundPortConfigDone);
1315
+ string value;
1316
+ bool foundPortConfigDone = m_portTable->hget (" PortConfigDone" , " count" , value);
1317
+ unsigned long portCount = stoul (value);
1318
+ SWSS_LOG_NOTICE (" foundPortConfigDone = %d, portCount = %lu, m_portCount = %u" , foundPortConfigDone, portCount, m_portCount);
1317
1319
1318
1320
bool foundPortInitDone = m_portTable->get (" PortInitDone" , tuples);
1319
1321
SWSS_LOG_NOTICE (" foundPortInitDone = %d" , foundPortInitDone);
@@ -1329,11 +1331,11 @@ bool PortsOrch::bake()
1329
1331
return false ;
1330
1332
}
1331
1333
1332
- if (m_portCount != keys.size () - 2 )
1334
+ if (portCount != keys.size () - 2 )
1333
1335
{
1334
1336
// Invalid port table
1335
- SWSS_LOG_ERROR (" Invalid port table: m_portCount , expecting %u , got %lu" ,
1336
- m_portCount , keys.size () - 2 );
1337
+ SWSS_LOG_ERROR (" Invalid port table: portCount , expecting %lu , got %lu" ,
1338
+ portCount , keys.size () - 2 );
1337
1339
1338
1340
cleanPortTable (keys);
1339
1341
return false ;
0 commit comments