From d90ce7776069b4d3efe3d215af4b45b29f40f1db Mon Sep 17 00:00:00 2001 From: Gene Lian Date: Mon, 9 Dec 2013 11:58:03 +0800 Subject: [PATCH] Bug 946942 - [MMS] MO/MT MMS fail if the MMS APN is shared with default APN (follow-up). r=anshulj,me a=v1.3+ --- dom/mobilemessage/src/gonk/MmsService.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom/mobilemessage/src/gonk/MmsService.js b/dom/mobilemessage/src/gonk/MmsService.js index b12cbe3eadc4..5cd4ad57d699 100644 --- a/dom/mobilemessage/src/gonk/MmsService.js +++ b/dom/mobilemessage/src/gonk/MmsService.js @@ -256,11 +256,13 @@ MmsConnection.prototype = { let networkManager = Cc["@mozilla.org/network/manager;1"].getService(Ci.nsINetworkManager); let activeNetwork = networkManager.active; - if (activeNetwork.serviceId != this.serviceId) { + + let rilNetwork = activeNetwork.QueryInterface(Ci.nsIRilNetworkInterface); + if (rilNetwork.serviceId != this.serviceId) { + if (DEBUG) debug("Sevice ID between active/MMS network doesn't match."); return; } - let rilNetwork = activeNetwork.QueryInterface(Ci.nsIRilNetworkInterface); // Set up the MMS APN setting based on the connected MMS network, // which is going to be used for the HTTP requests later. this.setApnSetting(rilNetwork);