Bug 734333 - B2G RIL: typo in RIL.iccIO() throws ReferenceError: request is not defined. r=philikon
--- a/dom/system/b2g/ril_worker.js
+++ b/dom/system/b2g/ril_worker.js
@@ -936,18 +936,18 @@ let RIL = {
let token = Buf.newParcel(REQUEST_SIM_IO, options);
Buf.writeUint32(options.command);
Buf.writeUint32(options.fileid);
Buf.writeString(options.path);
Buf.writeUint32(options.p1);
Buf.writeUint32(options.p2);
Buf.writeUint32(options.p3);
Buf.writeString(options.data);
- if (request.pin2 != null) {
- Buf.writeString(pin2);
+ if (options.pin2 != null) {
+ Buf.writeString(options.pin2);
}
Buf.sendParcel();
},
/**
* Deactivate a data call.
*
* @param cid
@@ -1779,27 +1779,27 @@ let Phone = {
}
if (DEBUG) debug("ICC I/O (" + sw1 + "/" + sw2 + ")");
switch (options.command) {
case ICC_COMMAND_GET_RESPONSE:
let response = Buf.readString();
let recordSize = parseInt(
response.substr(RESPONSE_DATA_RECORD_LENGTH * 2, 2), 16) & 0xff;
- let request = {
+ let options = {
command: ICC_COMMAND_READ_RECORD,
fileid: ICC_EF_MSISDN,
pathid: EF_PATH_MF_SIM + EF_PATH_DF_TELECOM,
p1: 1, // Record number, MSISDN is always in the 1st record
p2: READ_RECORD_ABSOLUTE_MODE,
p3: recordSize,
data: null,
pin2: null,
};
- RIL.iccIO(request);
+ RIL.iccIO(options);
break;
case ICC_COMMAND_READ_RECORD:
// Ignore 2 bytes prefix, which is 4 chars
let number = GsmPDUHelper.readStringAsBCD().toString().substr(4);
if (DEBUG) debug("MSISDN: " + number);
this.MSISDN = number;
break;
@@ -2269,27 +2269,27 @@ let Phone = {
getFailCauseCode: function getFailCauseCode(options) {
RIL.getFailCauseCode();
},
/**
* Get MSISDN
*/
getMSISDN: function getMSISDN() {
- let request = {
+ let options = {
command: ICC_COMMAND_GET_RESPONSE,
fileid: ICC_EF_MSISDN,
pathid: EF_PATH_MF_SIM + EF_PATH_DF_TELECOM,
p1: 0, // For GET_RESPONSE, p1 = 0
p2: 0, // For GET_RESPONSE, p2 = 0
p3: GET_RESPONSE_EF_SIZE_BYTES,
data: null,
pin2: null,
};
- RIL.iccIO(request);
+ RIL.iccIO(options);
},
/**
* Handle incoming messages from the main UI thread.
*
* @param message
* Object containing the message. Messages are supposed
*/