Skip to content

Commit

Permalink
[Linux] Use proper bluez_gatt_*_finish() after a call (#33590)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq authored May 24, 2024
1 parent e2f8fc3 commit ae67e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/Linux/bluez/BluezConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void BluezConnection::SubscribeCharacteristicDone(GObject * aObject, GAsyncResul
auto * pC2 = reinterpret_cast<BluezGattCharacteristic1 *>(aObject);

GAutoPtr<GError> error;
gboolean success = bluez_gatt_characteristic1_call_write_value_finish(pC2, aResult, &error.GetReceiver());
gboolean success = bluez_gatt_characteristic1_call_start_notify_finish(pC2, aResult, &error.GetReceiver());

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

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

GAutoPtr<GError> error;
gboolean success = bluez_gatt_characteristic1_call_write_value_finish(pC2, aResult, &error.GetReceiver());
gboolean success = bluez_gatt_characteristic1_call_stop_notify_finish(pC2, aResult, &error.GetReceiver());

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

Expand Down

0 comments on commit ae67e94

Please sign in to comment.