mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 1100285 - sessionId shouldn't be added in nfc-manager-send-file. r=dimi
This commit is contained in:
parent
87398db1ad
commit
6f58df1cee
@ -599,13 +599,14 @@ Nfc.prototype = {
|
||||
*/
|
||||
receiveMessage: function receiveMessage(message) {
|
||||
let isRFAPI = message.name == "NFC:ChangeRFState";
|
||||
if (!isRFAPI) {
|
||||
if (this.rfState != NFC.NFC_RF_STATE_DISCOVERY) {
|
||||
debug("NFC is not enabled. current rfState:" + this.rfState);
|
||||
this.sendNfcErrorResponse(message, NFC.NFC_GECKO_ERROR_NOT_ENABLED);
|
||||
return null;
|
||||
}
|
||||
let isSendFile = message.name == "NFC:SendFile";
|
||||
if (!isRFAPI && (this.rfState != NFC.NFC_RF_STATE_DISCOVERY)) {
|
||||
debug("NFC is not enabled. current rfState:" + this.rfState);
|
||||
this.sendNfcErrorResponse(message, NFC.NFC_GECKO_ERROR_NOT_ENABLED);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!isRFAPI && !isSendFile) {
|
||||
// Update the current sessionId before sending to the NFC service.
|
||||
message.data.sessionId = SessionHelper.getId(message.data.sessionToken);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user