mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Nimble: Corrected conditional check during connection to handle failure case
This commit is contained in:
parent
4d005b0fbc
commit
df2612d104
@ -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)) {
|
||||
|
@ -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) &&
|
||||
|
@ -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)) {
|
||||
|
@ -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
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user