Bug 982126: Set session ID in NFC messages, r=allstars.chh
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 11 Mar 2014 15:23:30 +0100
changeset 173103 ebe5eb5b8d2a357d7b1ed0cba512f72ba6db333f
parent 173102 272fc2a8481776382670f7abc34b2cf137a11652
child 173104 db7b1775f4600e22880922e950f779e8874afa42
push id5394
push usertdz@users.sourceforge.net
push dateWed, 12 Mar 2014 08:24:07 +0000
treeherderb2g-inbound@ebe5eb5b8d2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersallstars.chh
bugs982126
milestone30.0a1
Bug 982126: Set session ID in NFC messages, r=allstars.chh
dom/system/gonk/Nfc.js
--- a/dom/system/gonk/Nfc.js
+++ b/dom/system/gonk/Nfc.js
@@ -568,17 +568,17 @@ Nfc.prototype = {
     if (message.json.sessionToken !== this.sessionTokenMap[this._currentSessionId]) {
       debug("Invalid Session Token: " + message.json.sessionToken +
             " Expected Session Token: " + this.sessionTokenMap[this._currentSessionId]);
       this.sendNfcErrorResponse(message);
       return null;
     }
 
     // Update the current sessionId before sending to the worker
-    message.sessionId = this._currentSessionId;
+    message.json.sessionId = this._currentSessionId;
 
     switch (message.name) {
       case "NFC:GetDetailsNDEF":
         this.sendToWorker("getDetailsNDEF", message.json);
         break;
       case "NFC:ReadNDEF":
         this.sendToWorker("readNDEF", message.json);
         break;