Nimble: Corrected conditional check during connection to handle failure case

This commit is contained in:
Rahul Tank 2023-06-05 09:39:20 +05:30
parent 4d005b0fbc
commit df2612d104
6 changed files with 6 additions and 6 deletions

View File

@ -368,7 +368,7 @@ ble_htp_cent_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) {

View File

@ -275,7 +275,7 @@ blecent_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
if (strlen(CONFIG_EXAMPLE_PEER_ADDR) &&

View File

@ -301,7 +301,7 @@ blecent_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) {

View File

@ -134,7 +134,7 @@ ble_spp_client_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
/* The device has to advertise support for the SPP

View File

@ -511,7 +511,7 @@ blecent_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) {

View File

@ -420,7 +420,7 @@ blecent_should_connect(const struct ble_gap_disc_desc *disc)
rc = ble_hs_adv_parse_fields(&fields, disc->data, disc->length_data);
if (rc != 0) {
return rc;
return 0;
}
if (strlen(CONFIG_EXAMPLE_PEER_ADDR) && (strncmp(CONFIG_EXAMPLE_PEER_ADDR, "ADDR_ANY", strlen("ADDR_ANY")) != 0)) {