Bug 1170971 - Part 1: Fix BluetoothGattReadParam unpacking in daemon backend. r=tzimmermann

This commit is contained in:
Jocelyn Liu 2015-06-04 02:55:00 -04:00
parent d123ef915c
commit 9445ea0e91
2 changed files with 5 additions and 5 deletions

View File

@ -729,7 +729,7 @@ struct BluetoothGattReadParam {
BluetoothGattServiceId mServiceId;
BluetoothGattId mCharId;
BluetoothGattId mDescriptorId;
uint32_t mValueType;
uint16_t mValueType;
uint16_t mValueLength;
uint8_t mValue[BLUETOOTH_GATT_MAX_ATTR_LEN];
uint8_t mStatus;

View File

@ -1772,13 +1772,13 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothGattReadParam& aOut)
if (NS_FAILED(rv)) {
return rv;
}
/* unpack value type */
rv = UnpackPDU(aPDU, aOut.mValueType);
/* unpack status */
rv = UnpackPDU(aPDU, aOut.mStatus);
if (NS_FAILED(rv)) {
return rv;
}
/* unpack status */
rv = UnpackPDU(aPDU, aOut.mStatus);
/* unpack value type */
rv = UnpackPDU(aPDU, aOut.mValueType);
if (NS_FAILED(rv)) {
return rv;
}