Bug 734333 - B2G RIL: typo in RIL.iccIO() throws ReferenceError: request is not defined. r=philikon
authorYoshi Huang <yhuang@mozilla.com>
Fri, 09 Mar 2012 15:15:39 +0800
changeset 88808 170757be69f3d5d24c5cd2ee8fa1a083f5efd5a4
parent 88807 f92e3e6f93a750db10af92f2cd30ab616c4879eb
child 88809 b0cd3ea2398cac032087494a38d6900118bfc697
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersphilikon
bugs734333
milestone13.0a1
Bug 734333 - B2G RIL: typo in RIL.iccIO() throws ReferenceError: request is not defined. r=philikon
dom/system/b2g/ril_worker.js
--- 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
    */