@@ -522,7 +522,10 @@ static void prov_send_fail_msg(u8_t err)
522
522
523
523
prov_buf_init (& buf , PROV_FAILED );
524
524
net_buf_simple_add_u8 (& buf , err );
525
- prov_send (& buf );
525
+
526
+ if (prov_send (& buf )) {
527
+ BT_ERR ("Failed to send Provisioning Failed message" );
528
+ }
526
529
527
530
atomic_set_bit (link .flags , LINK_INVALID );
528
531
}
@@ -569,7 +572,6 @@ static void prov_invite(const u8_t *data)
569
572
570
573
if (prov_send (& buf )) {
571
574
BT_ERR ("Failed to send capabilities" );
572
- prov_send_fail_msg (PROV_ERR_RESOURCES );
573
575
return ;
574
576
}
575
577
@@ -808,7 +810,6 @@ static void send_confirm(void)
808
810
809
811
if (prov_send (& cfm )) {
810
812
BT_ERR ("Failed to send Provisioning Confirm" );
811
- prov_send_fail_msg (PROV_ERR_RESOURCES );
812
813
return ;
813
814
}
814
815
@@ -820,7 +821,9 @@ static void send_input_complete(void)
820
821
PROV_BUF (buf , 1 );
821
822
822
823
prov_buf_init (& buf , PROV_INPUT_COMPLETE );
823
- prov_send (& buf );
824
+ if (prov_send (& buf )) {
825
+ BT_ERR ("Failed to send Provisioning Input Complete" );
826
+ }
824
827
}
825
828
826
829
int bt_mesh_input_number (u32_t num )
@@ -1019,7 +1022,6 @@ static void prov_random(const u8_t *data)
1019
1022
1020
1023
if (prov_send (& rnd )) {
1021
1024
BT_ERR ("Failed to send Provisioning Random" );
1022
- prov_send_fail_msg (PROV_ERR_RESOURCES );
1023
1025
return ;
1024
1026
}
1025
1027
@@ -1103,7 +1105,10 @@ static void prov_data(const u8_t *data)
1103
1105
net_idx , iv_index , addr );
1104
1106
1105
1107
prov_buf_init (& msg , PROV_COMPLETE );
1106
- prov_send (& msg );
1108
+ if (prov_send (& msg )) {
1109
+ BT_ERR ("Failed to send Provisioning Complete" );
1110
+ return ;
1111
+ }
1107
1112
1108
1113
/* Ignore any further PDUs on this link */
1109
1114
link .expect = 0U ;
0 commit comments