Bug 736697 - Part 1: Remove SMS-SUBMIT-only property from SMS-DELIVER. r=philikon

This commit is contained in:
Vicamo Yang 2012-04-05 14:16:56 -07:00
Родитель e89ca09f92
Коммит 5567738301
1 изменённых файлов: 16 добавлений и 43 удалений

Просмотреть файл

@ -2790,10 +2790,8 @@ let GsmPDUHelper = {
// An empty message object. This gets filled below and then returned.
let msg = {
SMSC: null,
reference: null,
sender: null,
body: null,
validity: null,
timestamp: null
};
@ -2814,12 +2812,6 @@ let GsmPDUHelper = {
// User data header indicator
let hasUserDataHeader = firstOctet & PDU_UDHI;
// if the sms is of SMS-SUBMIT type it would contain a TP-MR
let isSmsSubmit = firstOctet & PDU_MTI_SMS_SUBMIT;
if (isSmsSubmit) {
msg.reference = this.readHexOctet(); // TP-Message-Reference
}
// - Sender Address info -
// Address length
let senderAddressLength = this.readHexOctet();
@ -2848,24 +2840,6 @@ let GsmPDUHelper = {
// - TP-Data-Coding-Scheme -
let dataCodingScheme = this.readHexOctet();
// SMS of SMS-SUBMIT type contains a TP-Service-Center-Time-Stamp field
// SMS of SMS-DELIVER type contains a TP-Validity-Period octet
if (isSmsSubmit) {
// - TP-Validity-Period -
// The Validity Period octet is optional. Depends on the SMS-SUBMIT
// first octet
// Validity Period Format. Bit4 and Bit3 specify the TP-VP field
// according to this table:
// bit4 bit3
// 0 0 : TP-VP field not present
// 1 0 : TP-VP field present. Relative format (one octet)
// 0 1 : TP-VP field present. Enhanced format (7 octets)
// 1 1 : TP-VP field present. Absolute format (7 octets)
if (firstOctet & (PDU_VPF_ABSOLUTE | PDU_VPF_RELATIVE | PDU_VPF_ENHANCED)) {
msg.validity = this.readHexOctet();
}
//TODO: check validity period
} else {
// - TP-Service-Center-Time-Stamp -
let year = this.readSwappedNibbleBCD(1) + PDU_TIMESTAMP_YEAR_OFFSET;
let month = this.readSwappedNibbleBCD(1) - 1;
@ -2884,7 +2858,6 @@ let GsmPDUHelper = {
} else {
msg.timestamp += tzOffset;
}
}
// - TP-User-Data-Length -
let userDataLength = this.readHexOctet();