rfcomm: fix checks for l2cap can send now

This commit is contained in:
Matthias Ringwald 2016-02-01 16:51:45 +01:00
parent 0f035029e4
commit 8ab4656a5b

View File

@ -2029,7 +2029,7 @@ int rfcomm_send_prepared(uint16_t rfcomm_cid, uint16_t len){
int err = rfcomm_assert_send_valid(channel, len);
if (err) return err;
if (l2cap_can_send_prepared_packet_now(channel->multiplexer->l2cap_cid)){
if (!l2cap_can_send_prepared_packet_now(channel->multiplexer->l2cap_cid)){
log_error("rfcomm_send_prepared: l2cap cannot send now");
return BTSTACK_ACL_BUFFERS_FULL;
}
@ -2058,7 +2058,7 @@ int rfcomm_send_internal(uint16_t rfcomm_cid, uint8_t *data, uint16_t len){
int err = rfcomm_assert_send_valid(channel, len);
if (err) return err;
if (l2cap_can_send_packet_now(channel->multiplexer->l2cap_cid)){
if (!l2cap_can_send_packet_now(channel->multiplexer->l2cap_cid)){
log_error("rfcomm_send_internal: l2cap cannot send now");
return BTSTACK_ACL_BUFFERS_FULL;
}