Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taks committed Oct 10, 2024
1 parent 1abcf8d commit da3cd95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/ble_characteristic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@ impl BLECharacteristic {

let om = unsafe { sys::ble_hs_mbuf_from_flat(value.as_ptr() as _, value.len() as _) };

let rc = unsafe { sys::ble_gattc_indicate_custom(conn_handle, self.handle, om) };
let rc = unsafe { sys::ble_gatts_indicate_custom(conn_handle, self.handle, om) };
if rc != 0 {
server.clear_indicate_wait(conn_handle);
}
BLEError::convert(rc as _)
} else if flag.contains(NimbleSub::NOTIFY) && self.properties.contains(NimbleProperties::NOTIFY)
{
let om = unsafe { sys::ble_hs_mbuf_from_flat(value.as_ptr() as _, value.len() as _) };
ble!(unsafe { sys::ble_gattc_notify_custom(conn_handle, self.handle, om) })
ble!(unsafe { sys::ble_gatts_notify_custom(conn_handle, self.handle, om) })
} else {
BLEError::convert(sys::BLE_HS_EINVAL)
}
Expand Down

0 comments on commit da3cd95

Please sign in to comment.