File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2012,8 +2012,9 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
20122012 ccc = attr -> user_data ;
20132013
20142014 for (i = 0 ; i < ARRAY_SIZE (ccc -> cfg ); i ++ ) {
2015- /* Ignore configuration for different peer */
2016- if (bt_conn_addr_le_cmp (conn , & ccc -> cfg [i ].peer )) {
2015+ /* Ignore configuration for different peer or not active */
2016+ if (!ccc -> cfg [i ].value ||
2017+ bt_conn_addr_le_cmp (conn , & ccc -> cfg [i ].peer )) {
20172018 continue ;
20182019 }
20192020
@@ -2043,14 +2044,14 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
20432044 }
20442045 }
20452046
2046- if (ccc -> cfg [i ].value ) {
2047- gatt_ccc_changed (attr , ccc );
2048- if (IS_ENABLED (CONFIG_BT_GATT_SERVICE_CHANGED ) &&
2049- ccc == & sc_ccc ) {
2050- sc_restore (conn );
2051- }
2052- return BT_GATT_ITER_CONTINUE ;
2047+ gatt_ccc_changed (attr , ccc );
2048+
2049+ if (IS_ENABLED (CONFIG_BT_GATT_SERVICE_CHANGED ) &&
2050+ ccc == & sc_ccc ) {
2051+ sc_restore (conn );
20532052 }
2053+
2054+ return BT_GATT_ITER_CONTINUE ;
20542055 }
20552056
20562057 return BT_GATT_ITER_CONTINUE ;
You can’t perform that action at this time.
0 commit comments