mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-17 20:42:47 +00:00
precise error codes: BTSTACK_ACL_BUFFERS_FULL RFCOMM_NO_OUTGOING_CREDITS
This commit is contained in:
parent
808a48ab66
commit
f52b01709e
@ -1279,7 +1279,7 @@ int rfcomm_send_internal(uint8_t rfcomm_cid, uint8_t *data, uint16_t len){
|
|||||||
// check for space on BT module
|
// check for space on BT module
|
||||||
if (!hci_number_free_acl_slots()) {
|
if (!hci_number_free_acl_slots()) {
|
||||||
log_dbg("rfcomm_send_internal: BT module full\n");
|
log_dbg("rfcomm_send_internal: BT module full\n");
|
||||||
return -1;
|
return BTSTACK_ACL_BUFFERS_FULL;
|
||||||
}
|
}
|
||||||
rfcomm_channel_t * channel = rfcomm_channel_for_rfcomm_cid(rfcomm_cid);
|
rfcomm_channel_t * channel = rfcomm_channel_for_rfcomm_cid(rfcomm_cid);
|
||||||
int result = 0;
|
int result = 0;
|
||||||
@ -1292,7 +1292,7 @@ int rfcomm_send_internal(uint8_t rfcomm_cid, uint8_t *data, uint16_t len){
|
|||||||
|
|
||||||
if (!channel->credits_outgoing){
|
if (!channel->credits_outgoing){
|
||||||
log_err("rfcomm_send_internal cid %u, no rfcomm outgoing credits!\n", rfcomm_cid);
|
log_err("rfcomm_send_internal cid %u, no rfcomm outgoing credits!\n", rfcomm_cid);
|
||||||
return -1;
|
return RFCOMM_NO_OUTGOING_CREDITS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this code should be only executed after a successful send. However,
|
// TODO: this code should be only executed after a successful send. However,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user