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 id14253
push userryanvm@gmail.com
push dateWed, 04 Mar 2015 15:25:57 +0000
treeherderb2g-inbound@82be6cb64840 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechen
bugs1138757
milestone39.0a1
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;