Skip to content

Commit b57bb1c

Browse files
iwanderslulf
authored andcommitted
Cleanup of debug print statements.
1 parent 1169297 commit b57bb1c

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

host/src/attribute.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ impl<'d, M: RawMutex, const MAX: usize> ServiceBuilder<'_, 'd, M, MAX> {
613613

614614
impl<M: RawMutex, const MAX: usize> Drop for ServiceBuilder<'_, '_, M, MAX> {
615615
fn drop(&mut self) {
616-
info!("dropping, current handle is {}", self.table.handle);
617616
let last_handle = self.table.handle;
618617
self.table.with_inner(|inner| {
619618
for item in inner.attributes[self.start..].iter_mut() {

host/src/attribute_server.rs

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -322,16 +322,6 @@ impl<'values, M: RawMutex, P: PacketPool, const ATT_MAX: usize, const CCCD_MAX:
322322
pub fn new(
323323
att_table: AttributeTable<'values, M, ATT_MAX>,
324324
) -> AttributeServer<'values, M, P, ATT_MAX, CCCD_MAX, CONN_MAX> {
325-
att_table.iterate(|mut it| {
326-
while let Some(att) = it.next() {
327-
trace!(
328-
"Entire table handle {} uuid {:x?}, last: {}",
329-
att.handle,
330-
att.uuid,
331-
att.last_handle_in_group
332-
);
333-
}
334-
});
335325
let cccd_tables = CccdTables::new(&att_table);
336326
AttributeServer {
337327
att_table,
@@ -442,38 +432,23 @@ impl<'values, M: RawMutex, P: PacketPool, const ATT_MAX: usize, const CCCD_MAX:
442432
let mut data = WriteCursor::new(buf);
443433

444434
let (mut header, mut body) = data.split(2)?;
445-
warn!("Looking for group: {:x?} between {} and {}", group_type, start, end);
446-
// self.att_table.iterate(|mut it| {
447-
// while let Some(att) = it.next() {
448-
// trace!("Entire table handle {} uuid {:x?}", att.handle, att.uuid);
449-
// }
450-
// });
451435
let err = self.att_table.iterate(|mut it| {
452436
let mut err = Err(AttErrorCode::ATTRIBUTE_NOT_FOUND);
453-
let mut found = false;
454437
while let Some(att) = it.next() {
438+
// trace!("[read_by_group] Check attribute {:x} {}", att.uuid, att.handle);
455439
if &att.uuid == group_type && att.handle >= start && att.handle <= end {
456-
debug!("[read_by_group] found! {:x?} {}", att.uuid, att.handle);
440+
// debug!("[read_by_group] found! {:x} {}", att.uuid, att.handle);
457441
handle = att.handle;
458442

459443
body.write(att.handle)?;
460444
body.write(att.last_handle_in_group)?;
461-
debug!("last_handle_in_group: {:?}", att.last_handle_in_group);
462445
err = self.read_attribute_data(connection, 0, att, body.write_buf());
463-
debug!("read_attribute_data: {:?}", err);
464446
if let Ok(len) = err {
465447
body.commit(len)?;
466448
}
467-
found = true;
468449
break;
469450
}
470451
}
471-
if !found {
472-
warn!(
473-
"[read_by_group] Dit not find attribute {:x?} between {} {}",
474-
group_type, start, end
475-
);
476-
}
477452
err
478453
});
479454

0 commit comments

Comments
 (0)