Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e95713d0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Floss: Refactor send_response to pass the value correctly"

parents ae92107d 43a16056
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2484,7 +2484,15 @@ impl IBluetoothGatt for BluetoothGatt {
            let conn_id = self.server_context_map.get_conn_id_from_address(server_id, &addr)?;
            let handle = self.server_context_map.get_request_handle_from_id(request_id)?;
            let len = value.len() as u16;
            let data: [u8; 600] = value.try_into().ok()?;

            let data: [u8; 600] = value
                .iter()
                .chain(std::iter::repeat(&0))
                .take(600)
                .cloned()
                .collect::<Vec<u8>>()
                .try_into()
                .ok()?;

            self.gatt.as_ref().unwrap().lock().unwrap().server.send_response(
                conn_id,