Bug 991988 - Resolve HostName of either MMS Proxy or MMSC. r=vyang

This commit is contained in:
Bevis Tseng 2014-04-10 12:03:56 +08:00
parent 8799eb119a
commit 8ea1e5890f

View File

@ -489,7 +489,14 @@ NetworkManager.prototype = {
debug("Network '" + network.name + "' registered, " +
"adding mmsproxy and/or mmsc route");
let mmsHosts = this.resolveHostname([network.mmsProxy, network.mmsc]);
let hostToResolve = network.mmsProxy;
// Workaround an xpconnect issue with undefined string objects.
// See bug 808220
if (!hostToResolve || hostToResolve === "undefined") {
hostToResolve = network.mmsc;
}
let mmsHosts = this.resolveHostname([hostToResolve]);
if (mmsHosts.length == 0) {
debug("No valid hostnames can be added. Stop adding host route.");
return;
@ -511,7 +518,14 @@ NetworkManager.prototype = {
debug("Network '" + network.name + "' unregistered, " +
"removing mmsproxy and/or mmsc route");
let mmsHosts = this.resolveHostname([network.mmsProxy, network.mmsc]);
let hostToResolve = network.mmsProxy;
// Workaround an xpconnect issue with undefined string objects.
// See bug 808220
if (!hostToResolve || hostToResolve === "undefined") {
hostToResolve = network.mmsc;
}
let mmsHosts = this.resolveHostname([hostToResolve]);
if (mmsHosts.length == 0) {
debug("No valid hostnames can be removed. Stop removing host route.");
return;