@@ -425,7 +425,7 @@ static void avdtp_process_configuration_cmd(struct bt_avdtp *session, struct net
425
425
uint8_t tid , bool reconfig )
426
426
{
427
427
int err = 0 ;
428
- int ret ;
428
+ int l2cap_ret ;
429
429
struct bt_avdtp_sep * sep ;
430
430
struct net_buf * rsp_buf ;
431
431
uint8_t error_code = 0 ;
@@ -493,13 +493,13 @@ static void avdtp_process_configuration_cmd(struct bt_avdtp *session, struct net
493
493
net_buf_add_u8 (rsp_buf , error_code );
494
494
}
495
495
496
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
497
- if (ret ) {
496
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
497
+ if (l2cap_ret ) {
498
498
net_buf_unref (rsp_buf );
499
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
499
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
500
500
}
501
501
502
- if (!reconfig && !err && !ret ) {
502
+ if (!reconfig && !err && !l2cap_ret ) {
503
503
bt_avdtp_set_state (sep , AVDTP_CONFIGURED );
504
504
}
505
505
@@ -566,7 +566,7 @@ static void avdtp_re_configure_rsp(struct bt_avdtp *session, struct net_buf *buf
566
566
static void avdtp_open_cmd (struct bt_avdtp * session , struct net_buf * buf , uint8_t tid )
567
567
{
568
568
int err = 0 ;
569
- int ret ;
569
+ int l2cap_ret ;
570
570
struct bt_avdtp_sep * sep ;
571
571
struct net_buf * rsp_buf ;
572
572
uint8_t error_code = 0 ;
@@ -603,13 +603,13 @@ static void avdtp_open_cmd(struct bt_avdtp *session, struct net_buf *buf, uint8_
603
603
session -> current_sep = sep ;
604
604
}
605
605
606
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
607
- if (ret ) {
606
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
607
+ if (l2cap_ret ) {
608
608
net_buf_unref (rsp_buf );
609
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
609
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
610
610
}
611
611
612
- if (!err && !ret ) {
612
+ if (!err && !l2cap_ret ) {
613
613
bt_avdtp_set_state (sep , AVDTP_OPENING );
614
614
}
615
615
@@ -663,7 +663,7 @@ static void avdtp_handle_reject(struct net_buf *buf, struct bt_avdtp_req *req)
663
663
static void avdtp_start_cmd (struct bt_avdtp * session , struct net_buf * buf , uint8_t tid )
664
664
{
665
665
int err = 0 ;
666
- int ret ;
666
+ int l2cap_ret ;
667
667
struct bt_avdtp_sep * sep ;
668
668
struct net_buf * rsp_buf ;
669
669
uint8_t error_code = 0 ;
@@ -698,13 +698,13 @@ static void avdtp_start_cmd(struct bt_avdtp *session, struct net_buf *buf, uint8
698
698
net_buf_add_u8 (rsp_buf , error_code );
699
699
}
700
700
701
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
702
- if (ret ) {
701
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
702
+ if (l2cap_ret ) {
703
703
net_buf_unref (rsp_buf );
704
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
704
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
705
705
}
706
706
707
- if (!err && !ret ) {
707
+ if (!err && !l2cap_ret ) {
708
708
bt_avdtp_set_state (sep , AVDTP_STREAMING );
709
709
}
710
710
@@ -741,7 +741,7 @@ static void avdtp_start_rsp(struct bt_avdtp *session, struct net_buf *buf, uint8
741
741
static void avdtp_close_cmd (struct bt_avdtp * session , struct net_buf * buf , uint8_t tid )
742
742
{
743
743
int err = 0 ;
744
- int ret ;
744
+ int l2cap_ret ;
745
745
struct bt_avdtp_sep * sep ;
746
746
struct net_buf * rsp_buf ;
747
747
uint8_t error_code = 0 ;
@@ -778,13 +778,13 @@ static void avdtp_close_cmd(struct bt_avdtp *session, struct net_buf *buf, uint8
778
778
bt_avdtp_set_state (sep , AVDTP_CLOSING );
779
779
}
780
780
781
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
782
- if (ret ) {
781
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
782
+ if (l2cap_ret ) {
783
783
net_buf_unref (rsp_buf );
784
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
784
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
785
785
}
786
786
787
- if (!err && !ret ) {
787
+ if (!err && !l2cap_ret ) {
788
788
bt_avdtp_set_state (sep , AVDTP_IDLE );
789
789
}
790
790
@@ -820,7 +820,7 @@ static void avdtp_close_rsp(struct bt_avdtp *session, struct net_buf *buf, uint8
820
820
static void avdtp_suspend_cmd (struct bt_avdtp * session , struct net_buf * buf , uint8_t tid )
821
821
{
822
822
int err = 0 ;
823
- int ret ;
823
+ int l2cap_ret ;
824
824
struct bt_avdtp_sep * sep ;
825
825
struct net_buf * rsp_buf ;
826
826
uint8_t error_code = 0 ;
@@ -855,13 +855,13 @@ static void avdtp_suspend_cmd(struct bt_avdtp *session, struct net_buf *buf, uin
855
855
net_buf_add_u8 (rsp_buf , error_code );
856
856
}
857
857
858
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
859
- if (ret ) {
858
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
859
+ if (l2cap_ret ) {
860
860
net_buf_unref (rsp_buf );
861
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
861
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
862
862
}
863
863
864
- if (!err && !ret ) {
864
+ if (!err && !l2cap_ret ) {
865
865
bt_avdtp_set_state (sep , AVDTP_OPEN );
866
866
}
867
867
@@ -898,7 +898,7 @@ static void avdtp_suspend_rsp(struct bt_avdtp *session, struct net_buf *buf, uin
898
898
static void avdtp_abort_cmd (struct bt_avdtp * session , struct net_buf * buf , uint8_t tid )
899
899
{
900
900
int err = 0 ;
901
- int ret ;
901
+ int l2cap_ret ;
902
902
struct bt_avdtp_sep * sep ;
903
903
struct net_buf * rsp_buf ;
904
904
uint8_t error_code = 0 ;
@@ -929,13 +929,13 @@ static void avdtp_abort_cmd(struct bt_avdtp *session, struct net_buf *buf, uint8
929
929
net_buf_add_u8 (rsp_buf , error_code );
930
930
}
931
931
932
- ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
933
- if (ret ) {
932
+ l2cap_ret = bt_l2cap_chan_send (& session -> br_chan .chan , rsp_buf );
933
+ if (l2cap_ret ) {
934
934
net_buf_unref (rsp_buf );
935
- LOG_ERR ("Error:L2CAP send fail - result = %d" , ret );
935
+ LOG_ERR ("Error:L2CAP send fail - result = %d" , l2cap_ret );
936
936
}
937
937
938
- if (!err && !ret ) {
938
+ if (!err && !l2cap_ret ) {
939
939
if ((sep -> state & (AVDTP_OPEN | AVDTP_STREAMING )) &&
940
940
(sep -> chan .state == BT_L2CAP_CONNECTED )) {
941
941
bt_avdtp_set_state (sep , AVDTP_ABORTING );
0 commit comments