Skip to content

Commit

Permalink
Merge pull request #41 from embassy-rs/reduce-logging
Browse files Browse the repository at this point in the history
reduce log spam
  • Loading branch information
lulf authored May 21, 2024
2 parents 55c34b4 + c3c9f9c commit 1844494
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion host/src/channel_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ impl<'d, const RXQ: usize> ChannelManager<'d, RXQ> {
let mut grant = match self.poll_request_to_send(cid, n_packets, None) {
Poll::Ready(res) => res?,
Poll::Pending => {
warn!("[l2cap][cid = {}]: not enough credits for {} packets", cid, n_packets);
return Err(Error::Busy.into());
}
};
Expand Down Expand Up @@ -712,6 +711,10 @@ impl<'d, const RXQ: usize> ChannelManager<'d, RXQ> {
storage.peer_credits -= credits;
return Poll::Ready(Ok(CreditGrant::new(&self.state, cid, credits)));
} else {
warn!(
"[l2cap][poll_request_to_send][cid = {}]: not enough credits, requested {} available {}",
cid, credits, storage.peer_credits
);
return Poll::Pending;
}
}
Expand Down
10 changes: 5 additions & 5 deletions host/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,11 @@ impl<'a, 'd, T: Controller> AclSender<'a, 'd, T> {
signal: &D,
p_buf: &mut [u8],
) -> Result<(), BleHostError<T::Error>> {
trace!(
"[l2cap] sending control signal (req = {}) signal: {:?}",
identifier,
signal
);
//trace!(
// "[l2cap] sending control signal (req = {}) signal: {:?}",
// identifier,
// signal
//);
let header = L2capSignalHeader {
identifier,
code: D::code(),
Expand Down

0 comments on commit 1844494

Please sign in to comment.