Skip to content

Commit 76e9881

Browse files
committed
[Linux] Use proper bluez_gatt_*_finish() after a call
1 parent 4d4cb5e commit 76e9881

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/Linux/bluez/BluezConnection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void BluezConnection::SubscribeCharacteristicDone(GObject * aObject, GAsyncResul
335335
auto * pC2 = reinterpret_cast<BluezGattCharacteristic1 *>(aObject);
336336

337337
GAutoPtr<GError> error;
338-
gboolean success = bluez_gatt_characteristic1_call_write_value_finish(pC2, aResult, &error.GetReceiver());
338+
gboolean success = bluez_gatt_characteristic1_call_start_notify_finish(pC2, aResult, &error.GetReceiver());
339339

340340
VerifyOrReturn(success == TRUE, ChipLogError(DeviceLayer, "FAIL: SubscribeCharacteristic : %s", error->message));
341341

@@ -367,7 +367,7 @@ void BluezConnection::UnsubscribeCharacteristicDone(GObject * aObject, GAsyncRes
367367
auto * pC2 = reinterpret_cast<BluezGattCharacteristic1 *>(aObject);
368368

369369
GAutoPtr<GError> error;
370-
gboolean success = bluez_gatt_characteristic1_call_write_value_finish(pC2, aResult, &error.GetReceiver());
370+
gboolean success = bluez_gatt_characteristic1_call_stop_notify_finish(pC2, aResult, &error.GetReceiver());
371371

372372
VerifyOrReturn(success == TRUE, ChipLogError(DeviceLayer, "FAIL: UnsubscribeCharacteristic : %s", error->message));
373373

0 commit comments

Comments
 (0)