Closed Bug 1014462 Opened 11 years ago Closed 11 years ago

[NFC] nfcd returns NFC_DISCONNECT_ERROR while trying to connect to a fake tag

Categories

(Firefox OS Graveyard :: NFC, defect)

x86
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tauzen, Unassigned)

References

Details

Attachments

(1 file)

Please consider the following marionette test scenario: 1. Toggle NFC On 2. Enable RE0 3. Register and fire onpeerready 4. Create mozNFCTag using sessionToken received in onpeerready callback 5. Call mozNFCTag.connect('NDEF') This results in an error, as expected. But the error code which nfcd is sending is NFC_DISCONNECT_ERROR [1]. I would expect to get here NFC_CONNECT_ERROR as we are trying to connect to a tag. This test is part of error message testing in Bug 933595. [1] https://github.com/mozilla-b2g/platform_system_nfcd/blob/master/src/NfcService.cpp#L383
Blocks: 933595
Attachment #8426926 - Flags: review?(allstars.chh)
I use ERROR_DISCONNECT because Android return ERROR_DISCONNECT when tag connect fail. But i do agree return NFC_ERROR_CONNECT is easier to understand. Yoshi, do you have any suggestion?
Flags: needinfo?(allstars.chh)
Comment on attachment 8426926 [details] pull-request-1014462.txt okay to me
Attachment #8426926 - Flags: review?(allstars.chh) → review+
Flags: needinfo?(allstars.chh)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: