Bug 1138757 - Part 1: Fix the logic of checking invalid port in CDMA WAP Push. r=echen
authorBevis Tseng <btseng@mozilla.com>
Tue, 03 Mar 2015 15:41:15 +0800
changeset 231815 c6e3576bab27e851bceaed97e4ab2018908da5d5
parent 231814 67812860b99757c686edb604387229d9ed301b1c
child 231816 82be6cb648403f6d67372a9b1f5b43be08432d10
push id28360
push userryanvm@gmail.com
push dateWed, 04 Mar 2015 20:58:22 +0000
treeherdermozilla-central@04653ab2dcb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechen
bugs1138757
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1138757 - Part 1: Fix the logic of checking invalid port in CDMA WAP Push. r=echen
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;