Bug 762425 - Always reconfigure network if found connected interface. r=philikon

This commit is contained in:
Kan-Ru Chen 2012-06-20 16:21:24 +08:00
Родитель 93a9a8bc5d
Коммит ffba851afb
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -175,7 +175,7 @@ NetworkManager.prototype = {
break;
}
}
if (this.active && (oldActive != this.active)) {
if (this.active) {
this.setDefaultRouteAndDNS(oldActive);
}
},
@ -185,7 +185,7 @@ NetworkManager.prototype = {
let options = {
cmd: this.active.dhcp ? "runDHCPAndSetDefaultRouteAndDNS" : "setDefaultRouteAndDNS",
ifname: this.active.name,
oldIfname: oldInterface ? oldInterface.name : null
oldIfname: (oldInterface && oldInterface != this.active) ? oldInterface.name : null
};
this.worker.postMessage(options);
},