Closed Bug 1161939 Opened 9 years ago Closed 9 years ago

[bluetooth2] Unable to write characteristic due to incorrect logic operators

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
2.2 S12 (15may)
Tracking Status
firefox40 --- fixed

People

(Reporter: elin, Assigned: brsun)

References

Details

Attachments

(1 file, 1 obsolete file)

Found that I can't write characteristic to my LE devices.

Here's the error log:
I/GeckoBluetooth( 7876): WriteValue: [WEBBT-API2] BT_ENSURE_TRUE_REJECT(mProperties & (GATT_CHAR_PROP_BIT_WRITE_NO_RESPONSE || GATT_CHAR_PROP_BIT_WRITE || GATT_CHAR_PROP_BIT_SIGNED_WRITE)) failed

Seems that the logic operators are incorrect in BluetoothGattCharacteristic::WriteValue

  BT_ENSURE_TRUE_REJECT(mProperties &
                          (GATT_CHAR_PROP_BIT_WRITE_NO_RESPONSE ||
                           GATT_CHAR_PROP_BIT_WRITE ||
                           GATT_CHAR_PROP_BIT_SIGNED_WRITE),
                        promise,
                        NS_ERROR_NOT_AVAILABLE);
Assignee: nobody → brsun
Attachment #8602027 - Flags: review?(joliu) → review+
Keywords: checkin-needed
note: BluetoothGattCharacteristic.cpp is located in dom/bluetooth/bluetooth2, so it not used in Gecko currently, and it is not compiled/built by default.
https://hg.mozilla.org/mozilla-central/rev/fe169f6b08ad
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S12 (15may)
Blocks: 1165848
You need to log in before you can comment on or make changes to this bug.