Bug 1138757 - Part 1: Fix the logic of checking invalid port in CDMA WAP Push. r=echen, a=bajaj
authorBevis Tseng <btseng@mozilla.com>
Tue, 03 Mar 2015 15:41:15 +0800
changeset 237442 d1c2dd2f5d4f6ed7f89edaad493e9d27eeb39ef5
parent 237441 63702742aa58356c888217cd731f06932494eec8
child 237443 f850ac0af68a27e64f57307312f8a723facaf8af
push id274
push userryanvm@gmail.com
push dateThu, 05 Mar 2015 21:09:52 +0000
treeherdermozilla-b2g37_v2_2@f850ac0af68a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechen, bajaj
bugs1138757
milestone37.0
Bug 1138757 - Part 1: Fix the logic of checking invalid port in CDMA WAP Push. r=echen, a=bajaj
dom/mobilemessage/gonk/MobileMessageDB.jsm
--- a/dom/mobilemessage/gonk/MobileMessageDB.jsm
+++ b/dom/mobilemessage/gonk/MobileMessageDB.jsm
@@ -2963,21 +2963,21 @@ MobileMessageDB.prototype = {
 
         // The port information is only available in 1st segment for CDMA WAP Push.
         // If the segments of a WAP Push are not received in sequence
         // (e.g., SMS with seq == 1 is not the 1st segment received by the device),
         // we have to retrieve the port information from 1st segment and
         // save it into the segmentRecord.
         if (aSmsSegment.teleservice === RIL.PDU_CDMA_MSG_TELESERIVCIE_ID_WAP
             && seq === 1) {
-          if (aSmsSegment.originatorPort === Ci.nsIGonkSmsService.SMS_APPLICATION_PORT_INVALID) {
+          if (aSmsSegment.originatorPort !== Ci.nsIGonkSmsService.SMS_APPLICATION_PORT_INVALID) {
             segmentRecord.originatorPort = aSmsSegment.originatorPort;
           }
 
-          if (aSmsSegment.destinationPort === Ci.nsIGonkSmsService.SMS_APPLICATION_PORT_INVALID) {
+          if (aSmsSegment.destinationPort !== Ci.nsIGonkSmsService.SMS_APPLICATION_PORT_INVALID) {
             segmentRecord.destinationPort = aSmsSegment.destinationPort;
           }
         }
 
         if (segmentRecord.receivedSegments < segmentRecord.segmentMaxSeq) {
           if (DEBUG) debug("Message is incomplete.");
           segmentStore.put(segmentRecord);
           return;