Check we have interface info before printing it

This commit is contained in:
Srivats P 2019-07-28 10:39:29 +05:30
parent 1db768afba
commit ea69335d29

View File

@ -105,6 +105,7 @@ PortManager::PortManager()
}
const InterfaceInfo *intfInfo = port->interfaceInfo();
if (intfInfo) {
qDebug("Mac: %012llx", intfInfo->mac);
foreach(Ip4Config ip, intfInfo->ip4)
qDebug("Ip4: %s/%d gw: %s",
@ -116,6 +117,7 @@ PortManager::PortManager()
qPrintable(QHostAddress(ip.address.toArray()).toString()),
ip.prefixLength,
qPrintable(QHostAddress(ip.gateway.toArray()).toString()));
}
if (!port->setRateAccuracy(txRateAccuracy))
qWarning("failed to set rateAccuracy (%d)", txRateAccuracy);