Fix bug can not show connected network after create a new wired net

This commit is contained in:
chenlelin 2021-01-13 14:41:02 +08:00
parent 96e2af3e5a
commit 7d1aeee17b
1 changed files with 2 additions and 1 deletions

View File

@ -85,11 +85,12 @@ IFace* BackThread::execGetIface()
// if type is wired network
iface->lname = iname;
qDebug() << "有线网的状态是 "<<istateStr;
if (istateStr == "unmanaged") {
iface->lstate = 2; //switch of wired device is off
} else if (istateStr == "disconnected" || istateStr == "unavailable") {
iface->lstate = 1; //wired network is disconnected
} else if (istateStr == "connected") {
} else if (istateStr == "connected" || istateStr == "connecting (getting IP configuration)") {
iface->lstate = 0; //wired network is connected
} else {
//连接中,正在配置