Bug 1228909 - Fix PDU packing in |ClientSetAdvDataCmd| for GATT API. r=brsun
authorJocelyn Liu <joliu@mozilla.com>
Mon, 30 Nov 2015 20:21:52 +0800
changeset 274493 e1a7b76b0148647fb9164a894db2a1dac293d600
parent 274492 0eec67815433beefcbfd2178f582c27fa9f2c08b
child 274494 73d9848a990ecc30fc3ddf162fc248ea28b5d471
push id18849
push userjoliu@mozilla.com
push dateMon, 30 Nov 2015 12:22:25 +0000
treeherderb2g-inbound@e1a7b76b0148 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbrsun
bugs1228909
milestone45.0a1
Bug 1228909 - Fix PDU packing in |ClientSetAdvDataCmd| for GATT API. r=brsun
dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
--- a/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
@@ -601,19 +601,20 @@ BluetoothDaemonGattModule::ClientSetAdvD
   nsresult rv = PackPDU(
     PackConversion<int, int32_t>(aServerIf),
     PackConversion<bool, uint8_t>(aIsScanRsp),
     PackConversion<bool, uint8_t>(aIsNameIncluded),
     PackConversion<bool, uint8_t>(aIsTxPowerIncluded),
     PackConversion<int, int32_t>(aMinInterval),
     PackConversion<int, int32_t>(aMaxInterval),
     PackConversion<int, int32_t>(aApperance),
-    aManufacturerLen, PackArray<char>(aManufacturerData, aManufacturerLen),
-    aServiceDataLen, PackArray<char>(aServiceData, aServiceDataLen),
-    aServiceUuidLen, PackArray<char>(aServiceUuid, aServiceUuidLen), *pdu);
+    aManufacturerLen, aServiceDataLen, aServiceUuidLen,
+    PackArray<char>(aManufacturerData, aManufacturerLen),
+    PackArray<char>(aServiceData, aServiceDataLen),
+    PackArray<char>(aServiceUuid, aServiceUuidLen), *pdu);
   if (NS_FAILED(rv)) {
     return rv;
   }
   rv = Send(pdu, aRes);
   if (NS_FAILED(rv)) {
     return rv;
   }
   Unused << pdu.forget();