Skip to content

Commit

Permalink
Applications: nrf5340_audio: Supress prints on ENOTCONN
Browse files Browse the repository at this point in the history
OCT-2876
Warning prints will be supressed if the conn is down

Signed-off-by: Kristoffer Rist Skøien <[email protected]>
  • Loading branch information
koffes authored and nordicjm committed Jan 30, 2024
1 parent 81498aa commit 24b675b
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ static int iso_stream_send(uint8_t const *const data, size_t size, struct bt_bap
}

if (ret < 0) {
LOG_WRN("Failed to send audio data: %d stream %p", ret, bap_stream);
if (ret != -ENOTCONN) {
LOG_WRN("Failed to send audio data: %d stream %p", ret, bap_stream);
}
net_buf_unref(buf);
atomic_dec(&tx_info->iso_tx_pool_alloc);
} else {
Expand Down Expand Up @@ -200,9 +202,11 @@ int bt_le_audio_tx_send(struct bt_bap_stream **bap_streams, struct le_audio_enco
if (!ts_common_acquired) {
ret = bt_bap_stream_get_tx_sync(bap_streams[i], &tx_info[i].iso_tx);
if (ret) {
LOG_WRN("Unable to get tx sync. ret: %d stream: %p", ret,
bap_streams[i]);
return ret;
if (ret != -ENOTCONN) {
LOG_WRN("Unable to get tx sync. ret: %d stream: %p", ret,
bap_streams[i]);
}
continue;
}

ts_common = tx_info[i].iso_tx.ts;
Expand Down

0 comments on commit 24b675b

Please sign in to comment.